_Val() function xsharp.core

This forum is meant for questions and discussions about the X# language and tools
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

_Val() function xsharp.core

Post by Chris »

Hi Karl,

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

XSharp Development Team
chris(at)xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

_Val() function xsharp.core

Post 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
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

_Val() function xsharp.core

Post 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..
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply