String to int ?

If doesn't fit into any other category ....
Post Reply
PANNO2
Posts: 51
Joined: Tue Jun 08, 2021 6:26 pm
Has thanked: 47 times
Been thanked: 3 times

String to int ?

Post by PANNO2 »

Hi,
Blitz is automatic casting a string to int.

a$="1234"
a=a$
Print a
a= 1234

how to do this in Annex ?
Zim
Posts: 280
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 253 times
Been thanked: 128 times

Re: String to int ?

Post by Zim »

Number to String:

mynumb = 123
mystrng$ = str$(mynumb) ' mystrng$ now equals 123


String to Number:

mystrng$ = "246"
mynumb = val(mystrng$) ' mynumb now equals 246
User avatar
PANNO
Posts: 114
Joined: Thu Feb 25, 2021 4:03 am
Has thanked: 121 times
Been thanked: 25 times

Re: String to int ?

Post by PANNO »

Thanks :mrgreen:
Post Reply