MattW
05-02-2013, 12:52
Hi,
Just a quick question. I'm trying to display on screen the contents of a string.
In QBasic it would be written:
A$="hello"
B$="goodbye"
print A$+" "+B$
(shows "hello goodbye")
I imagine the following would be the TB method, but it's not working probably as I've written it incorrectly:
a as string
b as string
c="hello"
d="goodbye"
canvas_print c
canvas_print c+" "+d (???)
I'm still trying to remember that a variable is defined as numeric or string via DECLARING IT FIRST. i.e. 'a' can be a string or numeric. In QBasic the dollar$ defines a "string".
Also, I'm not sure if maybe I could get this information during program execution? Again, sorry to keep refering to QB, but you could do CNTRL-BREAK to stop program execution, then F6 for the "immediate" section and do "print a$" and the results would be shown. Then F5 to continue program execution. I've read up that this can be done in TB?
Thanks for your help!
Matt
Just a quick question. I'm trying to display on screen the contents of a string.
In QBasic it would be written:
A$="hello"
B$="goodbye"
print A$+" "+B$
(shows "hello goodbye")
I imagine the following would be the TB method, but it's not working probably as I've written it incorrectly:
a as string
b as string
c="hello"
d="goodbye"
canvas_print c
canvas_print c+" "+d (???)
I'm still trying to remember that a variable is defined as numeric or string via DECLARING IT FIRST. i.e. 'a' can be a string or numeric. In QBasic the dollar$ defines a "string".
Also, I'm not sure if maybe I could get this information during program execution? Again, sorry to keep refering to QB, but you could do CNTRL-BREAK to stop program execution, then F6 for the "immediate" section and do "print a$" and the results would be shown. Then F5 to continue program execution. I've read up that this can be done in TB?
Thanks for your help!
Matt