No announcement yet.

Missing Declaration: ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing Declaration: ?

    Hi group..
    I'm pretty new to PB programming. I typed in the 'MYFIRST.BAS'
    listing as shown in 'USER.PDF' and when I tried compiling, I get the
    error 'Missing Declaration: N'. All the program is, is a FOR/NEXT
    loop. I tried some of the example files, and sometimes get the same
    problem. I also have PB v2.1 on the HD. Would that cause an interferrence?

    Any help greatly appreciated...




  • #2
    How 'bout posting and let's take a look at it.

    Oops! I forgot there was a .PDF there.

    There must be something else going on. If you type it in exactly
    as shown, there shouldn't be an issue. Are you sure you are
    compiling with 2.1 or something else.

    In PB/DOS, you don't need to declare anything before using it.
    If you are getting the "missing decleration" thingie, that tells
    me you may be accidently trying to compile with something else.


    [This message has been edited by Mel Bishop (edited August 15, 2005).]
    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.


    • #3
      Thanks Mel..
      I also asked Steve Rossell of PowerBASIC. He answered with...

      "The "Missing Declaration: N" error is occurring because the compiler
      (by default) is set to not automatically declare variables. Select the "Options" menu, then "Compiler", then
      "Variable Declarations", and select "None", this will let you use
      variables without declaring them first. Or you could declare the variable first.

      This sounds more like a documentation issue and the "MyFirst.bas"
      example should declare all variables so that the program would not be dependant
      on the users settings. I will send this to our documentation team."

      After changing the setting, I was able to compile and run it. Thank you, though, for the fast reply.
      This will NOT be my only problem. Gauranteed!!! As Arnold says...
      "I'll be Back!!! "



      [This message has been edited by Stafford White (edited August 15, 2005).]