Announcement

Collapse
No announcement yet.

PB Serial Communications

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

  • PB Serial Communications

    I am using PB 3.20 and have copied the sample program in the manual on page 298 of the programmers guide and it gives me:
    Error 418: Statement expected
    when it it tries to process the line reading:
    stuff$ = INPUT$(LOC(1),#1) 'read incoming characters

    Can anyone suggest a solution?

    thanx
    frank cernansky

  • #2
    STUFF is a reserved word. Change the name of your variable, and it will probably compile ok.

    The Serial Communications section of the manual was carried over from the days before POPUP STUFF was added to the language.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited June 24, 2000).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      eric,
      thank you for letting me know that "stuff" is a reserved word.
      I would have had grandchildren before I stumbled onto
      that twist, if then.
      thanx again.
      frank cernansky


      ------------------

      Comment


      • #4
        I have run across this problem several times and found this situation to massivly irritating. If I may submit a little trick:

        If you are running across compile errors and suspect that you may be using a reserved word or would like to check a word for its reserved status, simply place the cursor on the reserved word and press Cntl-F1. Generally speaking, if the word is reserved, the instructions for that word will come up. If not, the general help menu will come up. This trick will NOT work for words such as ABS and the like.


        ------------------
        There are no atheists in a fox hole or the morning of a math test.
        If my flag offends you, I'll help you pack.

        Comment


        • #5
          Noting the cursor position when the error message appears is also very helpful. In the case of the Stuff$ error, the cursor lands on the first character of the word Stuff$ to indicate that that's the "word" the compiler doesn't like.

          Pressing F1 while the error message is on the screen is also helpful. In this case, PowerBASIC displays "Some character could not be identified as a statement, meta statement, or variable.", which is a good clue too.

          -- Eric

          ------------------
          Perfect Sync: Perfect Sync Development Tools
          Email: mailto:[email protected][email protected]</A>



          [This message has been edited by Eric Pearson (edited June 26, 2000).]
          "Not my circus, not my monkeys."

          Comment

          Working...
          X