String to int ?

If doesn't fit into any other category ....
Post Reply
PANNO2
Posts: 16
Joined: Tue Jun 08, 2021 6:26 pm
Has thanked: 7 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: 88
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 61 times
Been thanked: 44 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: 57
Joined: Thu Feb 25, 2021 4:03 am
Has thanked: 51 times
Been thanked: 9 times

Re: String to int ?

Post by PANNO »

Thanks :mrgreen:
Post Reply