Can't Convert an INT to a String - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: Can't Convert an INT to a String (/showthread.php?tid=465) |
Can't Convert an INT to a String - TarotRedhand - 05-22-2022 What is wrong with this line - Code: (Select All) TempString$ = LTRIM(STR$(AYear%)) All variables are DIMed yet I get an Illegal string-number conversion error on that line. FWIW removing LTRIM has no effect on the error. This is driving me nuts. Thanks TR RE: Can't Convert an INT to a String - James D Jarvis - 05-22-2022 It should be: Code: (Select All) TempString$ = LTrim$(Str$(AYear%)) RE: Can't Convert an INT to a String - bplus - 05-22-2022 I have days like this, no $'s in sight! RE: Can't Convert an INT to a String - TarotRedhand - 05-22-2022 @James D Jarvis Thanks for being more observant than me. After a ton of bugs being squashed the little program appears to work. @bplus Being in the UK, I never have $ only £. TR RE: Can't Convert an INT to a String - James D Jarvis - 05-22-2022 (05-22-2022, 05:01 PM)TarotRedhand Wrote: @James D Jarvis Thanks for being more observant than me. After a ton of bugs being squashed the little program appears to work. I've spent hours rewriting subs tying to get them to work right and then I see I missed a "$" or typed "m" once out of dozens of times when I meant to use an n and the first version of the sub would have worked fine. |