Results 1 to 2 of 2

Thread: Help me please

  1. #1
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help me please

    Hi
    This is my script
    SCAR Code:
    var
      Incoming, Incoming2, Incoming3 : string;
      Outgoing : Extended;
     
    Procedure GetVars;
    Begin
      Incoming := ReadLn('From what temperature(Fahrenheit, Celcius and Kelvin)?');
      Incoming2 := ReadLn('Into what temperature(Fahrenheit, Celcius and Kelvin)?');
      if not Incoming := Fahrenheit or Celcius or Kelvin then
      Begin
        Unknown;
      End;
      Incoming3 := ReadLn('And how many of these?');
      StrToFloat(Incoming3);
    End;

    It says that it need a: then whare???
    maybe it is because i have those 'or' hmmm
    i havent worked with 'or' before
    maybe that is the problem

    \\Batnas

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    First of all Incoming is a string so you need to put ' around Fahrenheit, Celcius and Kelvin. Also ':=' is an assignment operator not a comparison operator meaning you can not use it in an 'if then' statement. The syntax for the 'if then' statement is also incorrect. Basically it should look like this:

    SCAR Code:
    if (not(Incoming = 'Fahrenheit')) and (not(Incoming = 'Celcius')) and (not(Incoming = 'Kelvin')) then

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •