Announcement

Collapse
No announcement yet.

IF (expected then???)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IF (expected then???)

    Every time I use an IF command even when I use THEN I still get
    an expected then error!

    My syntax is:-

    IF DATA$ = "." THEN
    {STATEMENTS}
    ELSEIF DATA$ = "HGF" THEN
    {STATEMENTS}
    ELSE
    {STATEMENTS}
    END IF

    Any ideas appreciated,
    Josh

  • #2
    Josh --

    DATA is a keyword in PowerBASIC so DATA$ is not a valid name for a variable. Change it to MyData$ and it will compile fine.

    -- Eric


    ------------------
    Perfect Sync Development Tools
    Perfect Sync Web Site
    Contact Us: mailto:[email protected][email protected]</A>
    "Not my circus, not my monkeys."

    Comment

    Working...
    X