Long in a String to a real Long

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by crono.

Hi folks,
i have a little problem...

I have a String like "$5400FFF6" and i want to get a long with the value of 1409351670.

If i make it manually like this:

Code: Select all

Value.l = $5400FFF6
it works fine, but how to do this if the Long is a String? If i use Val() it always returns me -1315779350

kind regards,
Alexander Schoenfeld

Email: [url]mailto:alexander.schoenfeld@chronologic.de[/url]
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by freak.

Val() only works for decimal Numbers.

See this thread for a solution:

viewtopic.php?t=1278

Timo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> how to do this if the Long is a String?

See the following thread... let me know if you need further help.

viewtopic.php?t=1671


PB - Registered PureBasic Coder
Post Reply