PDA

View Full Version : How do you detect decimal numbers?


wild8900
11-05-2006, 06:45 PM
I just need to know how I can detect a decimal number (like 1.5).
I need to know in Gs1 sorry.

Novo
11-05-2006, 06:49 PM
If you know it's a number...


if ( var % 1 > 0 )
...


I don't know GS1, so ... There might be a few errors... But the concept is there.

wild8900
11-05-2006, 07:05 PM
Alright, thanks, you have no idea how much this helped.

Admins
11-08-2006, 02:41 AM
or something like this?


if (var!=int(var))
...

KuJi
11-08-2006, 03:11 AM
Seriously, why didn't you just use int()? O.o

ryu_no_bishie
11-08-2006, 04:57 AM
maybe he uses vb? Int in vb is a solid non decimal number,

Twinny
11-08-2006, 06:19 AM
Yeah but VB sucks...and has no relevance to gscript ^-^

ryu_no_bishie
11-08-2006, 06:32 AM
vb isnt bad sintax in my opinion, its just the way it runs and its requirements and stuff really suck

wild8900
11-08-2006, 09:21 AM
lol its no big deal, my problem is solved!