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 2 of 7 Topic 210 of 276
Post > Topic >>

Re: Help Find Error

by earthling <somewhere@[EMAIL PROTECTED] > Oct 18, 2006 at 06:45 PM

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?
 




 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 Sat Jul 26 2:40:52 CDT 2008.