Skip to main content
guest
Join | Help | Sign In
Liberty BASIC Programmer's Encyc Home
guest| Join | Help | Sign In
Liberty BASIC Programmer's Encyc
  • Wiki Home
  • Recent Changes
  • Pages and Files
  • Members

Home

General Tutorials
Advanced Tutorials
GUI Programming
Graphics and Games
Strings and Text
Numbers and Math
Using Files
Windows API
Communications
Programmer's Tools

Articles by Date
FAQs
Rosetta Code
General Articles
Newsletters Contents

Table of Contents
Demos

Submit Articles
TOS and License

0305

Edit 1 …
  • 1 Tags
    • tutorials
  • Notify
  • RSS
  • Backlinks
  • Source
  • Print
  • Export (PDF)
Older Version Newer Version

Alyce Alyce Nov 4, 2006

[[map|Lesson Map]] | [[0306|Next > Add Comments]] = Print Text and Variables= In the [[0305|previous lesson]] you asked the user to type his name, then you printed it back out for him. [[code]] input "What is your name? "; name$ print name$ [[code]] You can make this seem a little more friendly by adding a message when you print the **name$** variable. You can "add" two pieces of text together by using the **+** symbol. It works whether the text is in quotation marks or contained in string variables. Here is some code that uses **+** to display two separate pieces of text. [[code]] print "Liberty " + "BASIC" [[code]] It's just that easy! Now you can greet your program's user by name. Type this code into the Liberty BASIC editor and run it to see the result. [[code]] input "What is your name? "; name$ print "It's nice to meet you, " + name$ [[code]] Liberty BASIC also lets you use the semicolon symbol to add pieces of text together. The semicolon looks like this. **;** It works in exactly the same way as the **+** symbol. This code does the same thing as the previous code. [[code]] input "What is your name? "; name$ print "It's nice to meet you, " ; name$ [[code]] [[map|Lesson Map]] | [[0306|Next > Add Comments]]
Help · About · Pricing · Privacy · Terms · Support · Upgrade
Contributions to https://lbpe.wikispaces.com/ are licensed under a Custom License.
Portions not contributed by visitors are Copyright 2018 Tangient LLC
TES: The largest network of teachers in the world
Turn off "Getting Started"
  1. Home
  2. ...
Loading...