Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't Convert an INT to a String
#1
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
Reply
#2
It should be:


Code: (Select All)
TempString$ = LTrim$(Str$(AYear%))
Reply
#3
I have days like this, no $'s in sight!
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply
#4
@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
Reply
#5
(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.

@bplus Being in the UK, I never have $ only £.

TR

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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Experimenting with a "StringList" type for simpler handling of string arrays/lists Heimdall 18 1,188 12-19-2025, 12:51 PM
Last Post: Heimdall
  Sub not Reconizing Dim as String pmackay 18 1,454 10-16-2025, 03:32 PM
Last Post: pmackay
  Illegal string-number conversion Herve 7 760 07-07-2025, 09:53 AM
Last Post: a740g
  need help printing a scaled string in a custom font to a 32-bit image madscijr 9 1,148 07-03-2025, 04:48 PM
Last Post: SMcNeill
  anyone good at javascript want to help convert a cool animation to QB64PE? madscijr 10 1,342 05-21-2025, 09:47 PM
Last Post: hsiangch_ong

Forum Jump:


Users browsing this thread: 1 Guest(s)