? Printing quotations (Page 1) ● SmileBASIC Source Forums

Sign In

*Usernames are case-sensitive
Forgot my password

Printing quotations

  • #1 ✎ 28 SaladFingers I'm trying to insert a print command into another program via a variable (it doesn't matter if this makes sense) and I'm wondering if there is a way to print a quotation. I know in Visual Basic you can just put a \ in and it'll ignore the quotation mark but is there a way in SB? Posted
  • #2 ✎ 222 Lacks Yes, there is, in the keyboard menu. Some of the vets know fancier methods tho. Posted Edited by randomous
  • #3 ✎ 122 raimondz First Week Joined in the very first week of SmileBASIC Source Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Yes, there is a way. Just use CHR$ to get that character. See the code below: VAR Q$=CHR$(34) ? Q$+"HELLO WORLD"+Q$ Posted
  • #4 ✎ 131 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies I have used this just because it doesn't require you to store the value in a variable: DEF Q() RETURN CHR$(34) END It can be used like: PRINT Q()+"HELLO WORLD"+Q() Posted Edited by MZ952
  • #5 ✎ 1467 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website Speed test results (MS per 1,000,000): "”" 1878 (doesn't work as a " in code) Q$ 1918 CHR$(34) 2683 KEY(3)[4] 2888 (don't use this lol) Q() 3862 Test code: C=MILLISEC FOR I=1 TO 1000000 S$="thing to test"*1 NEXT ?MILLISEC-C This isn't really important though, since even the slowest one only takes 0.000004 seconds (PRINT takes around 0.0004). Posted Edited by 12Me21
  • #6 ✎ 28 SaladFingers Thanks so much every one, I just had created a variable to store my quotation, thanks for the help! Posted