Qbasicnews.com

Full Version: convert a number into a string
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey,

i have 2 variables: num1% which is an integer and num2$ which is a string

num1% = 1111

i need num2$ = "1111"

this is because my function takes only strings

how can i achieve this?

thanks
STR$ Big Grin
Code:
CLS
num1% = 10
num2% = 30

nStr$ = str$(num1%) + str$(num2%)

PRINT nStr$
As easy as that! =P
what is the opposite of a str$( function?

Is there anyway to convert a string like "1111" into the number 1111?
VAL()

num = VAL("111")