| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | MPL function returns - Re |
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)
þ Synchronet þ thePharcyde_ >> telnet://bbs.pharcyde.org (Wisconsin)
* Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX (46:1/116)SEEN-BY: 19/33 103/705 124/5013 5014 5015 5016 130/803 154/10 203/0 221/0 SEEN-BY: 229/275 426 261/38 280/464 5003 292/624 396/40 45 423/120 633/267 280 SEEN-BY: 640/1384 712/132 620 848 770/1 31999/99 @PATH: 124/5013 5014 396/45 280/464 712/848 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.