I am having problems with the Str() and ValD() conversions and I can't see why. I am entering 1.2345 at the prompt and would expect all the prints and debugs to output this same figure (or the floating point equivalent) but it doesn't happen.
OpenConsole()
Global gk.d
Global qk.d
Global gks.s
Global qks.s
PrintN("If I ENTER 1.2345 AT THE FOLLOWING PROMPT")
PrintN("I WOULD EXPECT THAT 1.2345 WOULD BE PRINTED")
PrintN("OUT AT EACH OF THE PRINT AND DEBUG STATEMENTS")
PrintN("BUT IT'S NOT. WHAT AM I DOING WRONG?")
PrintN("")
Print("ENTER Gk: ")
gks.s = Input()
PrintN(gks)
Debug gks
gk = ValD(gks)
Debug gk
PrintN(Str(gk))
Debug gk
Debug ""
Debug ""
gk = 1.2345
gks = Str(gk)
Debug gks
PrintN(gks)
gk = ValF(gks)
PrintN(gks)
Debug gks
Debug gk
Input()
CloseConsole()
End
EnableExplicit
OpenConsole()
Define.d gk, qk
Define.s gks, qks
PrintN("If I ENTER 1.2345 AT THE FOLLOWING PROMPT")
PrintN("I WOULD EXPECT THAT 1.2345 WOULD BE PRINTED")
PrintN("OUT AT EACH OF THE PRINT AND DEBUG STATEMENTS")
PrintN("BUT IT'S NOT. WHAT AM I DOING WRONG?")
PrintN("")
Print("ENTER Gk: ")
gks = Input()
PrintN(gks)
Debug gks
gk = ValD(gks)
Debug gk
PrintN(StrD(gk))
Debug gk
Debug ""
Debug ""
gk = 1.2345
gks = StrD(gk)
Debug gks
PrintN(gks)
gk = ValF(gks)
PrintN(gks)
Debug gks
Debug gk
Input()
CloseConsole()