Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Old chess program in BASIC (long post)

Author: Tim Foden

Date: 06:34:11 03/21/05

Go up one level in this thread


On March 21, 2005 at 02:38:37, Dieter Buerssner wrote:

>On March 20, 2005 at 20:20:40, Walter Faxon wrote:
>
>>Here is the BASIC program as sent to me by Bill (323 lines):
>
>Thanks.
>
>Many lines snipped ...
>
>It is over 20 years ago, since I programmed in Basic.
>
>>1040 DIM A(7, 7), U(1, 6):
>
>A is a 2 dimensional array with dimensions 7*7, yes?
>And U? 1*6 does not seem to make too much sense (why would one want to have one
>dimension of length 1)?
>
>>1100 U = -1
>
>What does this mean?

In BASIC you are allowed to have an array variable is a different type to a
scalar.  Thus the array U() is different to the scalar variable U.  So in this
case U = -1 means put -1 in U.

Also U$ (string variable) is different to U& (long integer) and to U% (short
integer) etc.


>
>>1320 U = U + 1:
>
>And this? What does the colon on the end of the line mean?

And this means put U + 1 in to U.

The : is a statement separator.  Null statements are allowed.


Cheers, Tim.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.