Page 1 of 1
Posted: Sun Jul 29, 2001 10:35 am
by BackupUser
Restored from previous forum. Originally posted by Cantor.
Hi!
Normally (in other BASIC languages) "Val(A8)" results "8", but PureBasic doesn't filter the letters and results "178". Is it a bug or a feature?
Best regards,
Martin.
--
Best regards,
Martin
Posted: Mon Jul 30, 2001 6:54 am
by BackupUser
Restored from previous forum. Originally posted by Rings.
A8 -> Hex to Dez = 168
Siggi
Posted: Mon Jul 30, 2001 7:08 am
by BackupUser
Restored from previous forum. Originally posted by Cantor.
A8 -> Hex to Dez = 168
Siggi
But the val-function has to convert a STRING to a number by filtering all letters. It is unusual in BASIC-dialects for it to convert from a Hex-number.
Best regards, Martin
--
Best regards,
Martin
Posted: Tue Jul 31, 2001 4:48 am
by BackupUser
Restored from previous forum. Originally posted by Mr.Skunk.
Hello
Has said in the PB Doc :
"TRANSFORM a string into a numeric value. The string must be an integer in decimal format."
I think you're right Cantor, it's not a bug, it looks like a not well named function (as VAL usually filter and not transform the string)...
Mr Skunk
Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st