xsharp.eu • _Val() function xsharp.core - Page 3
Page 3 of 3

_Val() function xsharp.core

Posted: Sat Feb 27, 2021 5:56 pm
by Chris
Hi Karl,

I just checked, AsString() and Str() indeed display numbers in scientific notation when using SetScience(TRUE)

_Val() function xsharp.core

Posted: Sat Feb 27, 2021 7:21 pm
by Karl-Heinz
Hi Chris,

mmh, are you using 2.8 SP4 ?

i´m running SP3 - maybe that´s the problem ?

Code: Select all

FUNCTION Start()

SetScience ( TRUE )

? AsString(495000)  	// 495000
? Str ( 495000 )	// 495000
? 495000    		// 495000

regards
Karl-Heinz

_Val() function xsharp.core

Posted: Sat Feb 27, 2021 10:59 pm
by Chris
Hi Karl-Heinz,

Oh, I was just using floating point numbers, which do see to be printed in scientific notation. But that works only randomly, I just did a few more tests and it is an absolute mess. See the results of this

? SetScience(TRUE)
? Str(12345.678, 12,5) // 1.23456780e
? Str(1234567890000000,25,10)
? Str(12345.678, 12,5) // 1.2345.6780e !!!!!

they do not make any sense at all, so I think we can safely ignore scientific notation in the string functions..