April 24, 2024, 09:41:12 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Comparing Strings

Started by tbohon, August 12, 2009, 11:00:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tbohon

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
"If you lead your life the right way, the karma will take care of itself ... the dreams will come to you."  -- Randy Pausch, PhD (1961-2008)

Ionic Wind Support Team

You've got nothing after the "then".   In CBasic the THEN keyword is only valid for single line if statements

Paul.
Ionic Wind Support Team

tbohon

Obviously too much C# has rotted my brain ...  ;)

Tnx.
"If you lead your life the right way, the karma will take care of itself ... the dreams will come to you."  -- Randy Pausch, PhD (1961-2008)