IonicWind Software

Creative Basic => Console Programs => Topic started by: tbohon on August 12, 2009, 11:00:20 AM

Title: Comparing Strings
Post by: tbohon on August 12, 2009, 11:00:20 AM
I'm puzzled - the CBasic compiler complains about the 'if' statement in the following code segment:


  input "Correct any values (Y/N)?  ",d$
  d$ = ucase$(left$(d$,1))

  if d$ = "Y" then


I'm sure I'm doing something wrong but have looked through the Help file and it's not apparent.

Tnx.

Tom
Title: Re: Comparing Strings
Post by: Ionic Wind Support Team on August 12, 2009, 11:06:18 AM
You've got nothing after the "then".   In CBasic the THEN keyword is only valid for single line if statements

Paul.
Title: Re: Comparing Strings
Post by: tbohon on August 12, 2009, 11:29:02 AM
Obviously too much C# has rotted my brain ...  ;)

Tnx.