Page 1 of 1 1
Topic Options
#207741 - 2013-09-16 01:07 PM String conversion
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Hi,

Can someone point me towards the functions within Kixtart that let you convert a string to a number and a number to a string?

Thanks!!

Top
#207743 - 2013-09-16 02:52 PM Re: String conversion [Re: kelp7]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
Online Manual - http://www.kixtart.org/manual/

CStr() - http://www.kixtart.org/manual/Functions/CSTR.htm
Val() - http://www.kixtart.org/manual/Functions/Val.htm
_________________________
(... better days ahead)

Top
#207744 - 2013-09-16 03:00 PM Re: String conversion [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Kix will auto-convert without functions
 Code:
$V = "6"      ; number is a string type
$V = 0 + $V   ; now it's a number
$V = '' + $V  ; back to a string
$V = 1.0 * $V ; floating point
When Kix encounters an expression similar to above, the first value determines the result, casting all other values. Thus, if $V contained "6" (a string), then
 Code:
$V + 4
would equal "64" and not 10.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#207747 - 2013-09-16 03:59 PM Re: String conversion [Re: Glenn Barnas]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
I love Kixtart even more than I ever did now, thanks! \:\)
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.054 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org