home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 13114 
 GRYPHON to G00R00 
 MPL function returns - Re 
 31 Jan 19 19:20:24 
 
James,

I've been playing with MPL function that return the datatype of REAL, and they
don't seem to be working.  If I have a function return a REAL, it is always an
integer.  I have a global variable (Var TextReal : Real) and I assign it a
real number inside a function, but when when I assign value to the REAL
function, it always comes back as integer.

Var TestREAL : Real

Function Str2Real(S:String):Real
Var Ret  : Real
Begin
    TestREAL:=5.6
    Ret:=TestREAL
    Str2Real:=Ret
End

WriteLn('TestReal='+Real2Str(TestReal,2))
WriteLn('Str2Real='+Real2Str(Str2Real('5.6'),2))

--------------------
The output would be:

TestReal=5.6
Real2Str=5.0

Also, there doesn't seem to be a Str2Real function.

 "No matter where you go, there you are!" - B. Bonzai

--- Mystic BBS v1.10 A51 (Linux)
 * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX (46:1/116)
 þ Synchronet þ thePharcyde_ >> telnet://bbs.pharcyde.org (Wisconsin)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca