Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Re: Help Find E...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 210 of 276
Post > Topic >>

Re: Help Find Error

by "Michael Mattias" <mmattias@[EMAIL PROTECTED] > Oct 18, 2006 at 08:36 PM

"earthling" <somewhere@[EMAIL PROTECTED]
> wrote in message 
news:Xns9860962E1BD1somewhereouttherecom@[EMAIL PROTECTED]
> mathedman@[EMAIL PROTECTED]
 scribbled:
>
>>  What's wrong with this code??
>>    In PBCC, I get a compile error # 476 here and yet I don't see the
>> error. (N , ALF and X are declared global variables in PBMAIN)
>>
>>  SUB GetSol()
>>    LOCAL C AS LONG
>>    FOR C = 1 TO X
>>       IF X  MOD  C <> 0 THEN GOTO 99
>>       IF (C*N+C)  MOD ALF <> 0 THEN GOTO 99
>>       CALL UseThis(C)
>>       EXIT SUB
>> 99
>>    NEXT C
>> END SUB
>>
>
> quoted from the pbcc help file error 476:
>
> 476 Block/scanned statements not allowed here - Block statements (like
> WHILE/WEND, DO/LOOP, and SELECT CASE) are not allowed in single line IF
> statements.
> Additionally, you may not have a Sub or Function definition nested
> within the body of another definition.  A missing END SUB or END
FUNCTION
> can also cause this error.
>
>
> from that I would look at the call statement or the Usethis(C) routine.
> if you rem out that line do you still get the error?

If the "here" in " I get a compile error # 476 here" is at the start of
the 
SUB (the error message gives you a line number and column number!) then
your 
problem is in the code which precedes the SUB. e.g., no END FUNCTION or 
something like that. (just like the quoted error message says).

If "here" is on one of the lines within the sub, show which line and which

column.


>>  What's wrong with this code??
When you get this solved, I have an opinion on that, too.

MCM



>
 




 7 Posts in Topic:
Help Find Error
mathedman@[EMAIL PROTECTE  2006-10-18 17:58:44 
Re: Help Find Error
earthling <somewhere@[  2006-10-18 18:45:29 
Re: Help Find Error
"Michael Mattias&quo  2006-10-18 20:36:48 
Re: Help Find Error
mathedman@[EMAIL PROTECTE  2006-10-19 14:23:49 
Re: Help Find Error
"Michael Mattias&quo  2006-10-19 14:59:11 
Re: Help Find Error
mathedman@[EMAIL PROTECTE  2006-10-19 14:21:43 
Re: Help Find Error
"Michael Mattias&quo  2006-10-19 17:59:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 15:27:12 CDT 2008.