How to write code in BASIC Programming Languages

How to write code in BASIC Programming Languages

10 CLS
20 PRINT “Hello, world!”
30 PRINT “I’m learning about commands in BASIC.”
40 PRINT “This text is being printed via the PRINT command.”
50 PRINT “On the next line, I’ll use CLS.”
60 CLS
70 PRINT “Finally, on line 80, I’ll use END.”
80 END
90 PRINT “Now my program is over.”

Line 10 the display is cleared.
Lines 20 through 50 shows first paragraph displayed.
Line 60 again clears the display.
Line 70 shows the message you should see after you run this program.
Line 80 Ends the program.
Line 90 This line helps to show that a END statement stops the program at that point.

==========qBasic===========
CLS
ASTRING$ = “Hello World”
ANUMBER% = 10
PRINT ASTRING$
PRINT ANUMBER%

==========freeBasic=======
Cls
Dim aString As String
Dim anInteger As Integer
aString = “John Doe”
anInteger = 42
Print aString
Print anInteger
Sleep
End

tips & tricks

Join 7,719 other subscribers

interview questions


Algorithm Android Android Studio API APP Programming Apps blogging Browser CheatSheets Code Config CSS DATABASE dsa error Features HTML HTML5 IDE installation Interview Questions IOS iPhone javascript Mac objective-c OneDrive OS Placeholder Programming quicktips SDK SEO Settings SMO SQL swift swiftUI Teams Tips & Tricks Tools UI Web Wordpress Xcode


Archives

Discover more from CODE t!ps

Subscribe now to keep reading and get access to the full archive.

Continue reading