<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Basic' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Basic' posted on the 'Basic' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 13:58:29 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 13:58:29 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Basic</title>
      <link>http://www.programmersheaven.com/mb/basic/223936/223936/basic/</link>
      <description>my friend is programming in basic and i want to see a code. im wondering how it looks....lol&lt;br /&gt;
by the way, i can program in c++ a bit...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/basic/223936/223936/basic/</guid>
      <pubDate>Wed, 12 Nov 2003 06:13:46 -0700</pubDate>
      <category>Basic</category>
    </item>
    <item>
      <title>Re: Basic</title>
      <link>http://www.programmersheaven.com/mb/basic/223936/223965/re-basic/#223965</link>
      <description>: my friend is programming in basic and i want to see a code. im wondering how it looks....lol&lt;br /&gt;
: by the way, i can program in c++ a bit...&lt;br /&gt;
: &lt;br /&gt;
Hey there&lt;br /&gt;
&lt;br /&gt;
I'm a die heard QBASIC programmer and have some cracking code. get in touch with me at y2keable@hotmail.com and a'll send ya some of ma stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/basic/223936/223965/re-basic/#223965</guid>
      <pubDate>Wed, 12 Nov 2003 08:21:39 -0700</pubDate>
      <category>Basic</category>
    </item>
    <item>
      <title>Re: Basic</title>
      <link>http://www.programmersheaven.com/mb/basic/223936/224036/re-basic/#224036</link>
      <description>: my friend is programming in basic and i want to see a code. im wondering how it looks....lol&lt;br /&gt;
: by the way, i can program in c++ a bit...&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Is he using QBASIC or Visual Basic?  They work very differently, but the root language is the same.&lt;br /&gt;
&lt;br /&gt;
The major QBASIC commands include:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
&lt;span style="color: Green;"&gt;' REM or ' is what's used to add a comment.
 ' There is no closing comment, it just continues to the end of the line.
 ' There is also no end-of-operation symbol like in c++ (;)
 '  instead you just add a carriage return (ENTER) to go to the next command.&lt;/span&gt;
x = 1 &lt;span style="color: Green;"&gt;'Sets x equal to 1&lt;/span&gt;
x = x + 1 &lt;span style="color: Green;"&gt;'Sets x equal to x + 1&lt;/span&gt;
PRINT 1
PRINT "Hello"
x = 4
PRINT x &lt;span style="color: Green;"&gt;'PRINT can be used to display values, strings, and the value of a variable
     '(the last example will display "4" on the screen)&lt;/span&gt;
IF x = 4 THEN PRINT "x is equal to 4" &lt;span style="color: Green;"&gt;'Basic uses IF...THEN to test a value.
    ' What ever is after IF and before THEN is tested, if true whatever
    ' is after THEN is executed.&lt;/span&gt;
INPUT "Enter a number:", num1 &lt;span style="color: Green;"&gt;' Prompts for a number and stores it as &lt;em&gt;num1&lt;/em&gt;.&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You can do a lot with just those very basic principles.  Basic is called "basic" because it's very basic.  You're pretty much just speaking English to the computer.  If you want to draw a line you use the &lt;strong&gt;LINE&lt;/strong&gt; command.  A circle is the &lt;strong&gt;CIRCLE&lt;/strong&gt; command.  Change colors?  Use &lt;strong&gt;COLOR&lt;/strong&gt;.  You can define variables with &lt;strong&gt;DIM&lt;/strong&gt;, but in QBASIC variables are not needed to be defined.  They are just defined by QBASIC automatically when they are used.  However, in Visual Basic, though they will also be defined automatically, it is much more common to define variables manually.  Here's a very simple program using a few of the things I have mentioned.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
CLS &lt;span style="color: Green;"&gt;' Clears the screen.&lt;/span&gt;
INPUT "What is your name"; Name$ &lt;span style="color: Green;"&gt;'Using the $ symbol will automatically define that variable as a STRING&lt;/span&gt;
PRINT "Hello "; Name$
question:
INPUT "What would you like me to count to"; countnum
IF countnum &amp;lt; 0 THEN
 PRINT "I cannot count negative numbers."
 GOTO question
END IF
FOR x = 1 to countnum
PRINT x,
NEXT
PRINT
PRINT "I am done counting."
INPUT "Would you like me to count again (y/n)"; yn$
IF LCASE$(yn$) = "y" THEN GOTO question
PRINT "Good bye."
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/basic/223936/224036/re-basic/#224036</guid>
      <pubDate>Wed, 12 Nov 2003 12:27:44 -0700</pubDate>
      <category>Basic</category>
    </item>
  </channel>
</rss>