<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10014470645681162</id><updated>2024-09-09T02:44:04.011-07:00</updated><category term="Batch files"/><category term="CONST"/><category term="Comments"/><category term="Constants"/><category term="DIM"/><category term="Game Programming for Kids"/><category term="Literal Constants"/><category term="Literals"/><category term="PRINT"/><category term="QB64"/><category term="REM"/><category term="Symbolic Constants"/><category term="Variable Type"/><category term="Variables"/><category term="finite states"/><title type='text'>QB45 Lives!</title><subtitle type='html'>Programming in Microsoft QuickBASIC</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10014470645681162.post-5316963648077456245</id><published>2021-10-23T09:07:00.005-07:00</published><updated>2021-10-23T09:07:49.161-07:00</updated><title type='text'>I&#39;m Back!</title><content type='html'>&lt;p&gt;When my old WinXP laptop stopped working a few years ago, I stopped tinkering with BASIC. By the time I got a new laptop, it was Windows 8. And I couldn&#39;t remember my logon information. And the phone google wanted to send my recovery information to had been lost on Whiskey Row.&lt;/p&gt;&lt;p&gt;But a few days ago I decided to get back this old account. It actually took google more than two days to send me the password reset link.&lt;/p&gt;&lt;p&gt;I made it, though!&lt;/p&gt;&lt;p&gt;It has been a few years, but I intend to start tinkering with BASIC again. I have a Windows 10 laptop now. Any QB45 I mess with will be in either DOSbox or in a FreeDOS virtual machine. I miss XP.&lt;/p&gt;&lt;p&gt;There is a good chance that I will do most work with QB64 now that it has built-in debugging.&lt;/p&gt;&lt;p&gt;Somehow, in my time away, blogger broke my theme. I just assigned it something generic and dark. It will do for now.&lt;/p&gt;&lt;p&gt;Now I need to go check my old links.&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/5316963648077456245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qb45lives.blogspot.com/2021/10/im-back.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/5316963648077456245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/5316963648077456245'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/2021/10/im-back.html' title='I&#39;m Back!'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10014470645681162.post-3851927122675782443</id><published>2012-05-14T00:16:00.003-07:00</published><updated>2021-10-24T13:38:54.314-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="finite states"/><category scheme="http://www.blogger.com/atom/ns#" term="Game Programming for Kids"/><category scheme="http://www.blogger.com/atom/ns#" term="QB64"/><title type='text'>Video Game Programming for Kids</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;Recently I searched amazon.com for a book on QB64. I found &lt;a href=&quot;https://amzn.to/3pvsmpl&quot; target=&quot;_blank&quot;&gt;Video Game Programming for Kids by Jonathan S. Harbour&lt;/a&gt;. I checked out the preview of the book and downloaded the source code from the author&#39;s website (the URL was in the book preview).&lt;/div&gt;
&lt;br /&gt;
The book is very basic. I mean, it&#39;s written for kids and uses QB64. That&#39;s BASIC. It is also a very good introduction to game programming.&lt;br /&gt;
&lt;br /&gt;
As far as I can tell, this is the only book on Amazon that teaches QB64. Since it was only like $12, I bought it.&lt;br /&gt;
&lt;br /&gt;
I had tried QB64 a couple of years ago and couldn&#39;t get some of my old code to work in it so I went back to my QB45. Now, working along with this kids book I can see just how great QB64 really is.&lt;br /&gt;
&lt;br /&gt;
Also, much of the code in the book will compile in QB45. Here&#39;s a screen of me making the combination lock program in chapter 2 much more complicated than it needs to be:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr8V5mIE59XQ5iAcigJmYNaT1o7rCACyLe-_07vgnW43p2YcPruYg_fHSQRKFuqNjDyEWLEvhDx0dJhS0eSR0L2fwXV4T1oxPrJo31-O_HBk7bethZZkCvov0y9knvVO6PlTID_3PYVwI/s1600/ComLock2.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;373&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr8V5mIE59XQ5iAcigJmYNaT1o7rCACyLe-_07vgnW43p2YcPruYg_fHSQRKFuqNjDyEWLEvhDx0dJhS0eSR0L2fwXV4T1oxPrJo31-O_HBk7bethZZkCvov0y9knvVO6PlTID_3PYVwI/s400/ComLock2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I think that&#39;s OK since the author included the extraneous statement:&lt;br /&gt;
state = 1&lt;br /&gt;
&lt;br /&gt;
But that is the only mention of state. He did just write about the concept of &lt;a href=&quot;http://en.wikipedia.org/wiki/Finite-state_machine&quot; target=&quot;_blank&quot;&gt;finite states&lt;/a&gt; right before giving the source code for this program, but the program does not actually give an example for the idea. Hmm, maybe that&#39;s the next thing I should do to the program.&lt;br /&gt;
&lt;br /&gt;
Don&#39;t get me wrong, it&#39;s still the type of book I would have loved when I was 10.&lt;br /&gt;
&lt;br /&gt;
Excuse me, I have to use the concept in the program now . . . &lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
I just took a few moment out and used the idea of finite states in the program. The lock now has two states (locked and unlocked). Here&#39;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;O-----------------------------O
|       ComLock2.bas          |
|  Was CombinationLock.bas    |
| But was shortened for QB45  |
|                             |
|   And then I used arrays    |
|         and loops           |
| Just because I was bored!   |
|                             |
|The lock now has two states: |
|          1 Locked           |
|         2 Unlocked          |
O-----------------------------O


PRINT &quot;Combination Lock Game&quot;
PRINT &quot;Guess the combination lock if you can!&quot;
PRINT &quot;Each number will be from 1 to 6.&quot;
RANDOMIZE TIMER
guesses = 0
state = 1     &#39;State 1 is locked. State 2 is unlocked!
DIM number%(1 to 3)
DIM num%(1 to 3)


REM make the combination lock
FOR i = 1 to 3
 number%(i) = INT(RND * 6) + 1
NEXT i

REM Start the main LOOP
DO
    correct = 0
    INPUT &quot;Guess #1: &quot;, num%(1)
    INPUT &quot;Guess #2: &quot;, num%(2)
    INPUT &quot;Guess #3: &quot;, num%(3)

    REM check all three guesses
FOR count% = 1 to 3
 
    IF num%(count%) = number%(count%) THEN
        correct = correct + 1
        PRINT &quot;#&quot;count% &quot; is correct!&quot;
    ELSE
        IF number%(count%) &amp;gt; num%(count%) THEN PRINT &quot;#&quot;count% &quot; is higher&quot;
        IF number%(count%) &amp;lt; num%(count%) THEN PRINT &quot;#&quot;count% &quot; is lower&quot;
    END IF
NEXT count%
    

    guesses = guesses + 1
 
IF correct = 3 THEN state = 2

LOOP UNTIL state = 2


REM the player wins
PRINT &quot;You opened the lock and got the treasure!&quot;
PRINT &quot;It took you &quot;; guesses; &quot; guesses.&quot;



&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Anyway, Video Game Programming for Kids is a great little book for any young aspiring game programmer. You also might want to check out the author&#39;s forums &lt;a href=&quot;http://jharbour.com/forum/index.php?PHPSESSID=e9q58gchmcnjhkcdqi0sdcimd1&amp;amp;board=40.0&quot; target=&quot;_blank&quot;&gt;HERE&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/3851927122675782443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qb45lives.blogspot.com/2012/05/video-game-programming-for-kids.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/3851927122675782443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/3851927122675782443'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/2012/05/video-game-programming-for-kids.html' title='Video Game Programming for Kids'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr8V5mIE59XQ5iAcigJmYNaT1o7rCACyLe-_07vgnW43p2YcPruYg_fHSQRKFuqNjDyEWLEvhDx0dJhS0eSR0L2fwXV4T1oxPrJo31-O_HBk7bethZZkCvov0y9knvVO6PlTID_3PYVwI/s72-c/ComLock2.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10014470645681162.post-2924004498308383825</id><published>2011-11-12T01:02:00.002-08:00</published><updated>2021-10-24T13:43:38.940-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CONST"/><category scheme="http://www.blogger.com/atom/ns#" term="Constants"/><category scheme="http://www.blogger.com/atom/ns#" term="Literal Constants"/><category scheme="http://www.blogger.com/atom/ns#" term="Literals"/><category scheme="http://www.blogger.com/atom/ns#" term="Symbolic Constants"/><category scheme="http://www.blogger.com/atom/ns#" term="Variable Type"/><category scheme="http://www.blogger.com/atom/ns#" term="Variables"/><title type='text'>Literals, Constants, and Variables</title><content type='html'>&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Literals&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;Literals can be used in output either alone or in combination with constants, variables, or other literals.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;String Literals&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The following line of BASIC code uses the PRINT command to print the string literal &quot;Hello World!&quot; to the screen:&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;PRINT &quot;Hello World!&quot;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Numeric Literals&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The following line of BASIC code uses the PRINT command to print the sum of 2 and 3 to the screen:&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;PRINT 2 + 3&lt;/div&gt;&lt;br /&gt;
Numeric and string literals may be used together. The following code uses one PRINT command to print a string literal and a numeric literal on the same line:&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;PRINT &quot;The sum of 2 and 3 is&quot; 2 + 3&lt;/div&gt;&lt;br /&gt;
&lt;span data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #2200cb; background-color: #2b00fe;&quot;&gt;&lt;span data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-color: #e8e6e3; color: white;&quot;&gt;&lt;span&gt;&lt;span data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-color: #e8e6e3; color: black;&quot;&gt;GEEK NOTE: Literals are technically &quot;literal constants&quot;. The term &quot;literal constant&quot; doesn&#39;t make any sense though, since they are NOT stored in memory, they CANNOT be called anywhere else in a program, and are therefore NOT constants! They are literal and temporary. Not constant or permanent. For this reason I call them &quot;literals&quot;&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Constants&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;In QuickBASIC there are two types of constants. The first type of constant is called &quot;literal constant&quot; and is what I just described as a &quot;literal&quot; (scroll up and see the note in yellow). The second type of constant is what I think of as a true constant. The technical term is &quot;symbolic constant&quot;. For the sake of simplicity I will refer to these as &quot;constants&quot;.&lt;br /&gt;
&lt;br /&gt;
Constants are values you can call from other parts of your program. Constants remain constant. They do not vary. You cannot change them somewhere else in your program. You can, however, refer to them in other parts of your program.&lt;br /&gt;
&lt;br /&gt;
Real-world constants include your birth date, the number of hours in a day (24), and how many quarters make up a dollar (4).&lt;br /&gt;
&lt;br /&gt;
Constants are declared with the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CONST&lt;/span&gt; statement. The syntax for the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CONST&lt;/span&gt; statement is:&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;CONST &lt;i&gt;name&lt;/i&gt; = &lt;i&gt;expression&lt;/i&gt; [,&lt;i&gt;name&lt;/i&gt; = &lt;i&gt;expression&lt;/i&gt;]...&lt;/div&gt;&lt;br /&gt;
If you were writing a program which would use pi, you could either write out 3.14159 every time you need to use pi, or you could declare pi as a constant:&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CONST pi = 3.14159&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Using constants in this way not only cuts down on errors (what happens if you type the number wrong just once?), it also increases the readability of your programs.&lt;br /&gt;
&lt;br /&gt;
It should be noted that in the example just given, QuickBASIC made pi a single precision number. This is a default in QuickBASIC. You may want to get in the habit of using a data type suffix for single and double precision numbers. You cannot use any other numeric type declaration characters on constants. &lt;br /&gt;
&lt;br /&gt;
As mentioned before, you cannot change the value of a constant. If you declare pi as in the sample above and then later in the program write the following statement...&lt;br /&gt;
pi = pi +1&lt;br /&gt;
&lt;br /&gt;
... the compiler will generate an error.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;u&gt;&lt;b&gt;Variables&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;Variables have a name, data type, and a value. You can call and change variables throughout your program.&lt;br /&gt;
&lt;br /&gt;
Real-world variables include your age, the number of hours you sleep in a day (0 to 24), and how many quarters are in your pocket. &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Variable Names&lt;/span&gt;&lt;br /&gt;
Variable names begin with a letter and may contain up to 40 letters or numbers. You may not use QB reserved words as variable names. It is recommended that you use a data type suffix for all variables.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Variable Types&lt;/span&gt;&lt;br /&gt;
QB has five standard data types. Here&#39;s a handy table that shows these data types and the type declaration character (or &quot;suffix&quot;) for each type.&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #00007a; background-color: #000099; text-align: left; width: 100%;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #000000; --darkreader-inline-color: #e8e6e3; background-color: black; color: white; font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;Data Type&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #000000; --darkreader-inline-color: #e8e6e3; background-color: black; color: white; font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;Suffix&lt;br /&gt;
or&lt;br /&gt;
&quot;Type Declaration Character&quot;&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #000000; --darkreader-inline-color: #e8e6e3; background-color: black; color: white; font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;Highest Value&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #000000; --darkreader-inline-color: #e8e6e3; background-color: black; color: white; font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;Lowest Value&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;Integer&lt;/td&gt;&lt;td style=&quot;font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;%&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot;&gt;32,767&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot;&gt;-32,768&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; text-align: center;&quot;&gt;Long Integer&lt;br /&gt;
a.k.a.&lt;br /&gt;
LONG&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;&amp;amp;&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; text-align: center;&quot;&gt;2,147,483,647&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; text-align: center;&quot;&gt;-2,147,483,648&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;Single-precision&lt;br /&gt;
a.k.a.&lt;br /&gt;
SINGLE&lt;/td&gt;&lt;td style=&quot;font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;!&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot;&gt;3.4028233E+38&lt;br /&gt;
(absolute value)&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot;&gt;1.401298E-45&lt;br /&gt;
(absolute value)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; text-align: center;&quot;&gt;Double-precision&lt;br /&gt;
a.k.a.&lt;br /&gt;
DOUBLE&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;#&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; text-align: center;&quot;&gt;1.797693134862315D+308&lt;br /&gt;
(absolute value)&lt;/td&gt;&lt;td data-darkreader-inline-bgcolor=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #4d5356; background-color: #666666; text-align: center;&quot;&gt;4.940656458412465D-324&lt;br /&gt;
(absolute value)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;STRING&lt;/td&gt;&lt;td style=&quot;font-weight: bold; text-align: center;&quot;&gt;&lt;big&gt;&lt;big&gt;$&lt;/big&gt;&lt;/big&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot;&gt;32,767 Characters&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot;&gt;0 Characters&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;You can assign one of these data types to a variable by using type declaration characters like so:&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;FirstName$&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;LastName$&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Age%&lt;/div&gt;&lt;br /&gt;
This gives our program two string variables and one integer variable.&lt;br /&gt;
&lt;br /&gt;
You could also assign a data type to a variable as part of a DIM statement:&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;DIM FirstName as STRING&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;DIM LastName as STRING&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;DIM Age as INTEGER&lt;/div&gt;&lt;br /&gt;
Do not use type declaration characters in &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;DIM&lt;/span&gt; statements unless you are using arrays.</content><link rel='replies' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/2924004498308383825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qb45lives.blogspot.com/2011/11/literals-constants-and-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/2924004498308383825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/2924004498308383825'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/2011/11/literals-constants-and-variables.html' title='Literals, Constants, and Variables'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10014470645681162.post-8675776268314200075</id><published>2010-06-23T11:15:00.000-07:00</published><updated>2010-06-23T13:30:18.539-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Comments"/><category scheme="http://www.blogger.com/atom/ns#" term="REM"/><title type='text'>Comments and REMarks</title><content type='html'>REM is the QB keyword for REMark. REM statements are ignored entirely by QB. They are only there for programmers and anyone else who reads your BASIC source code.&lt;br /&gt;&lt;br /&gt;Your computer would be just fine if you programmed it in assembler or machine code, but would you? BASIC is an easy to understand language with simple English keywords, but even BASIC programs can look cryptic and confusing without proper comments.&lt;br /&gt;&lt;br /&gt;You can also use apostrophes to begin a comment. Unlike the keyword REM, you can place this second form of REMark after other BASIC statements.&lt;br /&gt;&lt;br /&gt;Take a look at REMarks.bas to get an idea of how comments work. Run the code to see how QB ignores all REMarks.&lt;br /&gt;&lt;table style=&quot;width: 80%; text-align: left; margin-left: auto; margin-right: auto;&quot; border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;pre&gt;&lt;span style=&quot;font-family:Fixedsys;&quot;&gt;&lt;span style=&quot;font-family:monospace;&quot;&gt;&#39;      O------------------------O&lt;br /&gt;&#39;      |      REMarks.bas       |&lt;br /&gt;&#39;      |REMarks.bas demonstrates|&lt;br /&gt;&#39;      |the use of comments and |&lt;br /&gt;&#39;      |     REMarks in QB      |&lt;br /&gt;&#39;      |                        |&lt;br /&gt;&#39;      |       KEYWORDS:        |&lt;br /&gt;&#39;      |          REM           |&lt;br /&gt;&#39;      |           &#39;            |&lt;br /&gt;&#39;      O------------------------O&lt;br /&gt;&lt;br /&gt;PRINT &quot;This line gets printed.&quot;&lt;br /&gt;REM &quot;And this line does not.&quot;&lt;br /&gt;&lt;br /&gt;PRINT &quot;These words are printed, &quot; &#39; and these are not.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;font-family: Fixedsys; font-weight: bold;&quot; align=&quot;right&quot;&gt; &lt;td&gt;REMarks.bas&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;The output for REMarks.bas should be:&lt;code&gt;&lt;br /&gt;This line gets printed.&lt;br /&gt;These words are printed,&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that you can place an apostrophe comment after the PRINT statement (or any other executable statement) but you can&#39;t place an executable statement after an apostrophe.&lt;br /&gt;&lt;br /&gt;Different programmers use REMarks in different ways. You will see all of my programs start with a text box of sorts with each line beginning with an apostrophe. These text boxes contain information about the program. Similar, less ornate comments appear throughout my source code explaining what is happening in SUBs, FUNCTIONs, and wherever I feel the need.&lt;br /&gt;&lt;br /&gt;You can use REMarks to explain what a SUB or FUNCTION is for, like this:&lt;br /&gt;&lt;code&gt;REM This function calculates collision damage.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;When I first started looking at professional source code I noticed many inside jokes and general sillyness inside source comments, function names,  and variable names. At first I thought it was annoying, and then I realized it helped programmers &quot;play&quot; with the variables, code, and functions. This kind of play increases a programmer&#39;s interest in the code and this in turn increases creativity and understanding of the code. So don&#39;t be surprised when you see references in other people&#39;s code to Monty Python, the Hitch Hiker&#39;s Guide, or game characters named superSpeedyBadass.</content><link rel='replies' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/8675776268314200075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qb45lives.blogspot.com/2010/06/comments-and-remarks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/8675776268314200075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/8675776268314200075'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/2010/06/comments-and-remarks.html' title='Comments and REMarks'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10014470645681162.post-107400268087979530</id><published>2010-06-02T22:33:00.000-07:00</published><updated>2010-11-26T09:59:30.823-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DIM"/><category scheme="http://www.blogger.com/atom/ns#" term="PRINT"/><title type='text'>PRINT Statement</title><content type='html'>&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; style=&quot;text-align: left; width: 100%;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;th&gt;PRINT Statement&lt;/th&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Syntax&lt;/span&gt;:&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT [&lt;span style=&quot;font-style: italic;&quot;&gt;expression  list&lt;/span&gt;] [{,|;}]...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-style: italic;&quot;&gt;Description&lt;/span&gt;:  Prints text to the screen at the cursor location.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-style: italic;&quot;&gt;Example&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: courier new;&quot;&gt;PRINT &lt;/span&gt;&quot;hello world!&quot;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: yellow; color: black;&quot;&gt;Standard Use&lt;/h2&gt;&lt;span style=&quot;color: yellow;&quot;&gt;&lt;/span&gt;If your program displays text on the screen for users, you probably want to use the &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; statement. The first form of &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; we will look at has the following syntax:&lt;br /&gt;
&lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT &lt;/span&gt;&lt;span style=&quot;font-family: Fixedsys; font-style: italic;&quot;&gt;expression&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This simple form of the &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; statement can be seen in &lt;a href=&quot;https://docs.google.com/leaf?id=0B6fRfWMLG-lMY2FiZWI0MzYtMjk4ZS00YmRlLWE5ZTMtZTdhMTg5YTI1MzA1&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello.bas&lt;/a&gt;, which is our &quot;Hello World&quot; program (the standard first program in any programming language).&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: left; width: 80%;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;td&gt;&lt;pre&gt;&#39;      O------------------------------------------O
&#39;      |                hello.bas                 |
&#39;      |   This is the standard first program     |
&#39;      |in any programming language. This program |
&#39;      |   prints the words &quot;Hello World!&quot; to     |
&#39;      |               the screen.                |
&#39;      |                                          |
&#39;      |                KEYWORDS:                 |
&#39;      |                  PRINT                   |
&#39;      O------------------------------------------O

PRINT &quot;Hello world!&quot;

PRINT

&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr align=&quot;right&quot; style=&quot;font-family: Fixedsys; font-weight: bold;&quot;&gt; &lt;td&gt;&lt;a href=&quot;https://docs.google.com/leaf?id=0B6fRfWMLG-lMY2FiZWI0MzYtMjk4ZS00YmRlLWE5ZTMtZTdhMTg5YTI1MzA1&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot;&gt;hello.bas&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
This program prints the words &quot;Hello World!&quot; to the screen.&lt;br /&gt;
&lt;span style=&quot;font-family: Fixedsys;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Fixedsys;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;h2 color=&quot;black&quot;&gt;String Variables&lt;/h2&gt;The text in quotes in &lt;a href=&quot;https://docs.google.com/leaf?id=0B6fRfWMLG-lMY2FiZWI0MzYtMjk4ZS00YmRlLWE5ZTMtZTdhMTg5YTI1MzA1&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello.bas&lt;/a&gt; is called a &quot;string literal&quot;. It is not assigned a place in memory and there is no way for you to call this string anywhere else in the program or to change this string as the program is running. &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt;  displays string literals just as they appear in code (minus the quotes). &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT &lt;/span&gt;can also display string string variables.&lt;br /&gt;
&lt;br /&gt;
In our next program, &lt;a href=&quot;http://docs.google.com/leaf?id=0B6fRfWMLG-lMYmM4YjVhNDctYzA0YS00MDcxLTgwYzMtZmY5MjE3Yzc1ZTgw&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello2.bas&lt;/a&gt;, we assign a string to a string variable and then use the &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt;  command to print the contents of the variable to the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: left; width: 80%;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;td&gt;&lt;pre&gt;&#39;      O-----------------------------O
&#39;      |         hello2.bas          |
&#39;      |  hello2.bas uses a string   |
&#39;      | variable to print the words |
&#39;      |&quot;Hello World!&quot; to the screen.|
&#39;      |                             |
&#39;      |          KEYWORDS:          |
&#39;      |             DIM             |
&#39;      |            PRINT            |
&#39;      O-----------------------------O

DIM hello$
hello$ = &quot;Hello world!&quot;

PRINT hello$

&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr align=&quot;right&quot; style=&quot;font-family: Fixedsys; font-weight: bold;&quot;&gt; &lt;td&gt;&lt;a href=&quot;http://docs.google.com/leaf?id=0B6fRfWMLG-lMYmM4YjVhNDctYzA0YS00MDcxLTgwYzMtZmY5MjE3Yzc1ZTgw&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot;&gt;hello2.bas&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
In &lt;a href=&quot;http://docs.google.com/leaf?id=0B6fRfWMLG-lMYmM4YjVhNDctYzA0YS00MDcxLTgwYzMtZmY5MjE3Yzc1ZTgw&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello2.bas&lt;/a&gt;, we assign a string (&quot;&lt;span style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;Hello World!&lt;/span&gt;&quot;) as a value to a string variable (&lt;span style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello$&lt;/span&gt;). We can change the value of &lt;span style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello$&lt;/span&gt; anywhere in our program.&lt;br /&gt;
&lt;br /&gt;
In &lt;a href=&quot;http://docs.google.com/leaf?id=0B6fRfWMLG-lMMjEyYjQ4NTktZDE3Yy00ZDJlLTk0ZTEtYTg2YjE5MTdhZWEy&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new; font-weight: bold;&quot;&gt;hello3.bas&lt;/a&gt;, we have one string variable that holds a series of strings. Each &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt;  statement is the same, but as the value in the string variable changes, so does the text printed to the screen.&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: left; width: 80%;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;td&gt;&lt;pre&gt;&#39;      O-------------------------O
&#39;      |       hello3.bas        |
&#39;      |hello3.bas uses a string |
&#39;      |variable to print strings|
&#39;      |     to the screen.      |
&#39;      |                         |
&#39;      |        KEYWORDS:        |
&#39;      |           DIM           |
&#39;      |          PRINT          |
&#39;      O-------------------------O

DIM hello$

hello$ = &quot;Hello Canada!&quot;
PRINT hello$

hello$ = &quot;Hello world!&quot;
PRINT hello$

hello$ = &quot;Hello universe!&quot;
PRINT hello$

hello$ = &quot;What&#39;s the frequency, Kenneth?&quot;
PRINT hello$

&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr align=&quot;right&quot; style=&quot;font-family: courier new; font-weight: bold;&quot;&gt; &lt;td&gt;&lt;a href=&quot;http://docs.google.com/leaf?id=0B6fRfWMLG-lMMjEyYjQ4NTktZDE3Yy00ZDJlLTk0ZTEtYTg2YjE5MTdhZWEy&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot;&gt;hello3.bas&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;background-color: yellow; color: black;&quot;&gt;Full Syntax&lt;/h2&gt;The use of QuickBASIC&#39;s &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; statement in &lt;a href=&quot;https://docs.google.com/leaf?id=0B6fRfWMLG-lMY2FiZWI0MzYtMjk4ZS00YmRlLWE5ZTMtZTdhMTg5YTI1MzA1&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new;&quot;&gt;hello.bas&lt;/a&gt;  demonstrates how &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; can display  information on the screen, but does not show the real potential of &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt;. In &lt;a href=&quot;https://docs.google.com/leaf?id=0B6fRfWMLG-lMY2FiZWI0MzYtMjk4ZS00YmRlLWE5ZTMtZTdhMTg5YTI1MzA1&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot; style=&quot;font-family: courier new;&quot;&gt;hello.bas&lt;/a&gt;,  &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; displayed the string literal &quot;Hello  world!&quot;, but &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt; can also display the  results of simple or complex expressions involving variables, constants,  math, and string concatenation. The full syntax of the QuickBASIC &lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT&lt;/span&gt;  statement is:&lt;br /&gt;
&lt;span style=&quot;font-family: Fixedsys;&quot;&gt;PRINT  [&lt;span style=&quot;font-style: italic;&quot;&gt;expression list&lt;/span&gt;] [{,|;}]...&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: yellow; color: black;&quot;&gt;Numeric Literals&lt;br /&gt;
&lt;/h2&gt;</content><link rel='replies' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/107400268087979530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qb45lives.blogspot.com/2010/06/print-statement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/107400268087979530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/107400268087979530'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/2010/06/print-statement.html' title='PRINT Statement'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10014470645681162.post-445273650001673838</id><published>2010-05-30T14:56:00.000-07:00</published><updated>2010-05-30T16:40:42.692-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Batch files"/><title type='text'>Run Your .BAS Files in Windows Explorer</title><content type='html'>Want to double click your .BAS files in Windows Explorer  and have them run by QB? Type the following text into your favorite text editor and type (or copy/paste) the following text:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;REM qbrunner.bat&lt;br /&gt;REM To install, place this bat in your QB folder,&lt;br /&gt;REM right click on a .bas file and choose the&lt;br /&gt;REM program to open with. Navigate to and select&lt;br /&gt;REM this batch file. Then make sure you check&lt;br /&gt;REM the &quot;Alway use the selected program...&quot; box.&lt;br /&gt;REM After that you can just run .bas files in&lt;br /&gt;REM Windows Explorer.&lt;br /&gt;&lt;br /&gt;@ECHO OFF&lt;br /&gt;CLS&lt;br /&gt;PROMPT&lt;br /&gt;COLOR 47&lt;br /&gt;TITLE &quot;%~n1&quot; is now running...&lt;br /&gt;&lt;br /&gt;REM Start in your file&#39;s folder&lt;br /&gt;CD &quot;%~dp1&quot;&lt;br /&gt;REM Change the path to QB on your computer&lt;br /&gt;C:\QBasic\QB.exe /L /RUN %~nx1&lt;br /&gt;&lt;br /&gt;ECHO.&lt;br /&gt;ECHO.&lt;br /&gt;ECHO.&lt;br /&gt;TITLE WE NOW RETURN YOU TO YOUR SYSTEM&lt;br /&gt;PAUSE&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Save this file as qbrunner.bat in your QB install folder.&lt;br /&gt;&lt;br /&gt;Next, right click on a .bas file. Select &quot;Open With &gt; Choose Program...&quot;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglMMttnI_uoOCBUOhaC7xSy-LLYmCfSS5Ea0ge14IGOfk7IEXeJ2pzsy7asrZsVbc720RM33nZ9J0WKpYmLmfAcay1KROmtfs5LK_ZL1ompvjgSJvo7CLdHxnRI4B8W_eoXR9YOKHRCDY/s1600/openWith.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 356px; height: 305px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglMMttnI_uoOCBUOhaC7xSy-LLYmCfSS5Ea0ge14IGOfk7IEXeJ2pzsy7asrZsVbc720RM33nZ9J0WKpYmLmfAcay1KROmtfs5LK_ZL1ompvjgSJvo7CLdHxnRI4B8W_eoXR9YOKHRCDY/s400/openWith.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5477187978994757298&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;In the window that pops up, click the &quot;Browse...&quot; button.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRXx3R0s6xEpmCQPgw9xWYSZ1MFGXxP6QG8GcLNeJLam23OjuzwENaYWNNDWohgAdKIUk4uRFL2KnWQNhid50noUf6sjFfuYj9xGT2wBnYS9i1dUi6qyPXtIkhERcng68h5lqMd0qRoH0/s1600/openWithBrowse.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 341px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRXx3R0s6xEpmCQPgw9xWYSZ1MFGXxP6QG8GcLNeJLam23OjuzwENaYWNNDWohgAdKIUk4uRFL2KnWQNhid50noUf6sjFfuYj9xGT2wBnYS9i1dUi6qyPXtIkhERcng68h5lqMd0qRoH0/s400/openWithBrowse.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5477191600330479778&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Navigate to qbrunner.bat and press &quot;Open&quot;.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Ek2lMGL_TkTe9me2b-mweBJGGomlXdNoUtmGRmCJxMtwXBtXuJ-jd1q4y2Stq2DHnBg2arPPsv2-43yehfCfOs_kNimwnFr_nbrpiW8NMSCujjABa3PrVZOF6ADINoLvyqXFJuipyto/s1600/openWithQBR.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 267px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Ek2lMGL_TkTe9me2b-mweBJGGomlXdNoUtmGRmCJxMtwXBtXuJ-jd1q4y2Stq2DHnBg2arPPsv2-43yehfCfOs_kNimwnFr_nbrpiW8NMSCujjABa3PrVZOF6ADINoLvyqXFJuipyto/s400/openWithQBR.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5477192393987163186&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Back in the &quot;Open With&quot; dialog, check the &quot;Always use...&quot; box and click &quot;OK&quot;.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ot_4AXXXA2MU8vroFab0cXw8g6CQMGOoM4ap0lb-y9a8MEXQ8FPsn4FC0D51vO3hUJqcqzMy_RQDxJP1q-XW_v3-H2OycEaQbxKCBNpIuJ82tjH6ExGIgzZdez3UJO3ta20KkyXpbzs/s1600/alwaysUse.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 341px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ot_4AXXXA2MU8vroFab0cXw8g6CQMGOoM4ap0lb-y9a8MEXQ8FPsn4FC0D51vO3hUJqcqzMy_RQDxJP1q-XW_v3-H2OycEaQbxKCBNpIuJ82tjH6ExGIgzZdez3UJO3ta20KkyXpbzs/s400/alwaysUse.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5477193235986834914&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Now, when you double click a .bas file in Windows Explorer your code will be interpreted by QB.&lt;br /&gt;&lt;br /&gt;If you do not want the QB environment to open when the .BAS file is done, use keyword &lt;span style=&quot;font-weight: bold; font-family: courier new;&quot;&gt;SYSTEM &lt;/span&gt;instead of &lt;span style=&quot;font-weight: bold; font-family: courier new;&quot;&gt;END&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This file can be found &lt;a href=&quot;http://docs.google.com/leaf?id=0B6fRfWMLG-lMZjczMzE3OTEtMzM0MC00OWU4LThjM2ItNWI1MWFlYzU0ZWM4&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot;&gt;HERE&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://qb45lives.blogspot.com/feeds/445273650001673838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qb45lives.blogspot.com/2010/05/run-your-bas-files-in-windows-explorer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/445273650001673838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10014470645681162/posts/default/445273650001673838'/><link rel='alternate' type='text/html' href='http://qb45lives.blogspot.com/2010/05/run-your-bas-files-in-windows-explorer.html' title='Run Your .BAS Files in Windows Explorer'/><author><name>GamerPlusPlus</name><uri>http://www.blogger.com/profile/01409409616361823679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDdhRdGhUHwE9hoPoqKtsZTjZYyR2GaTac2r7qKV500eavAoZncEVI9CldN-XWnRIt6IWRg6tI5Ecc_HOgQHmSa5ZsMHm7chgWcOUaxVsw0vzN0ADsYTx7HbzeAzu5J5w/s220/DesktopBackground.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglMMttnI_uoOCBUOhaC7xSy-LLYmCfSS5Ea0ge14IGOfk7IEXeJ2pzsy7asrZsVbc720RM33nZ9J0WKpYmLmfAcay1KROmtfs5LK_ZL1ompvjgSJvo7CLdHxnRI4B8W_eoXR9YOKHRCDY/s72-c/openWith.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>