QB 4.5 - Expression too complex 
Author Message
 QB 4.5 - Expression too complex

Hi,
I have an error in QB 4.5 when I'm trying to compile my program. I never had
this error before. The Screen looks like this:

-------------------------------------------------------------------------
BC C:\QB\DCF.BAS/O/T/C:512;
[...]
 068A  01EA  IF Reserve = 1 THEN PRINT "aktiv  " ELSE PRINT "inaktiv"
                                                 ^ Expression too complex
[...]
-------------------------------------------------------------------------

What will I have to do to not get this error anymore? Might changing of the
compiler Options help or will I have to change anything in the Program?

Thanks,
Arne (Germany)



Wed, 19 Jan 2005 16:29:01 GMT  
 QB 4.5 - Expression too complex


Quote:
>Hi,
>I have an error in QB 4.5 when I'm trying to compile my program. I never had
>this error before. The Screen looks like this:

>-------------------------------------------------------------------------
>BC C:\QB\DCF.BAS/O/T/C:512;
>[...]
> 068A  01EA  IF Reserve = 1 THEN PRINT "aktiv  " ELSE PRINT "inaktiv"
>                                                 ^ Expression too complex
>[...]
>-------------------------------------------------------------------------

>What will I have to do to not get this error anymore? Might changing of the
>compiler Options help or will I have to change anything in the Program?

What type is 'Reserve'? If it is a simple datatype, I can't see
anything complex here, but is it a function?


Wed, 19 Jan 2005 22:04:06 GMT  
 QB 4.5 - Expression too complex

Quote:
> > 068A  01EA  IF Reserve = 1 THEN PRINT "aktiv  " ELSE PRINT "inaktiv"

> What type is 'Reserve'? If it is a simple datatype, I can't see
> anything complex here, but is it a function?

Reserve is a Standard Variable, not defined. the Programm contains no DEFxxx
instructions - so it's a single, Symbol "!"?


Wed, 19 Jan 2005 23:05:08 GMT  
 QB 4.5 - Expression too complex

Quote:

>> > 068A  01EA  IF Reserve = 1 THEN PRINT "aktiv  " ELSE PRINT "inaktiv"

>> What type is 'Reserve'? If it is a simple datatype, I can't see
>> anything complex here, but is it a function?

>Reserve is a Standard Variable, not defined. the Programm contains no DEFxxx
>instructions - so it's a single, Symbol "!"?

I just tried the expression you were attempting to compile and it compiled just
fine for me.


Wed, 19 Jan 2005 23:14:21 GMT  
 QB 4.5 - Expression too complex

Quote:
> I just tried the expression you were attempting to compile and it
> compiled just fine for me.

Try compiling the whole program
http://people.freenet.de/Elektronikseite/dcf.bas
(don't run it - it might hang up if there is no DCF receiver connected!)


Wed, 19 Jan 2005 23:46:12 GMT  
 QB 4.5 - Expression too complex

Quote:
> > I just tried the expression you were attempting to compile and it
> > compiled just fine for me.

> Try compiling the whole program
> http://people.freenet.de/Elektronikseite/dcf.bas
> (don't run it - it might hang up if there is no DCF receiver connected!)

Compiles fine with powerbasic, provided the variable "Min" is
changed to something else (min is a reserved word).

Some BASICs will give the "expression too complex" error
due to a problem it encounters on a prior line.  I note
that a line previous to the line in question is inordinately
long.  Try breaking it up into a few, smaller lines and see
if your compiler isn't happier.



Thu, 20 Jan 2005 00:02:47 GMT  
 QB 4.5 - Expression too complex

Quote:
> Some BASICs will give the "expression too complex" error
> due to a problem it encounters on a prior line.  I note
> that a line previous to the line in question is inordinately
> long.  Try breaking it up into a few, smaller lines and see
> if your compiler isn't happier.

Just tried it, works fine! Thanks!
Where is the limit, 127 Char/line?

- Arne



Thu, 20 Jan 2005 00:51:52 GMT  
 QB 4.5 - Expression too complex


Quote:
> > I just tried the expression you were attempting to compile and it
> > compiled just fine for me.

> Try compiling the whole program
> http://people.freenet.de/Elektronikseite/dcf.bas
> (don't run it - it might hang up if there is no DCF receiver connected!)



Thu, 20 Jan 2005 01:06:16 GMT  
 QB 4.5 - Expression too complex
I tried it and got the same error using Basic PDS 7.1.  I think the error is
really 2 lines above where ParDat is assigned.  Try something like:

ParDat = 0
FOR I = 36 TO 57
    ParDat = ParDat + D(I)
NEXT

HTH,
Brad Kunkel
www.ibisoftware.com


Quote:
> > I just tried the expression you were attempting to compile and it
> > compiled just fine for me.

> Try compiling the whole program
> http://people.freenet.de/Elektronikseite/dcf.bas
> (don't run it - it might hang up if there is no DCF receiver connected!)



Thu, 20 Jan 2005 01:09:11 GMT  
 QB 4.5 - Expression too complex

Quote:
> > Some BASICs will give the "expression too complex" error
> > due to a problem it encounters on a prior line.  I note
> > that a line previous to the line in question is inordinately
> > long.  Try breaking it up into a few, smaller lines and see
> > if your compiler isn't happier.

> Just tried it, works fine! Thanks!
> Where is the limit, 127 Char/line?

I'm not sure.  My rule of thumb has always been, if it
runs more than a few characters beyond the margin, break
the line.

I also noticed that the line in question forms a sum of
consecutive elements of an array.  Did you consider
replacing the explicit sum with a for..next loop?



Thu, 20 Jan 2005 01:04:20 GMT  
 QB 4.5 - Expression too complex

Quote:
> I also noticed that the line in question forms a sum of
> consecutive elements of an array.  Did you consider
> replacing the explicit sum with a for..next loop?

No! But that is a good idea - i'll think about using for-next loop for the
Parity Checksum Calculations. This might make the code much shorter.

- Arne



Thu, 20 Jan 2005 02:22:35 GMT  
 QB 4.5 - Expression too complex

Quote:
> I tried it and got the same error using Basic PDS 7.1.  I think the
> error is really 2 lines above where ParDat is assigned.

Greg Neill wrote that earlier - you should read the whole thread befor
answering!

Quote:
> Try
> something like:

> ParDat = 0
> FOR I = 36 TO 57
>     ParDat = ParDat + D(I)
> NEXT

I'll think about it. Actually, I have something like this:

ParDat = D(36) + [...] + D(45)
ParDat = ParDat + D (46) + [...]+ D (57)

and it works fine.

- Arne



Thu, 20 Jan 2005 02:24:45 GMT  
 QB 4.5 - Expression too complex
His answer wasn't there when I wrote mine.  There's a time lag in receiving
newsgroup updates (at least with my ISP).
Brad Kunkel
www.ibisoftware.com


Quote:
> > I tried it and got the same error using Basic PDS 7.1.  I think the
> > error is really 2 lines above where ParDat is assigned.

> Greg Neill wrote that earlier - you should read the whole thread befor
> answering!

> > Try
> > something like:

> > ParDat = 0
> > FOR I = 36 TO 57
> >     ParDat = ParDat + D(I)
> > NEXT

> I'll think about it. Actually, I have something like this:

> ParDat = D(36) + [...] + D(45)
> ParDat = ParDat + D (46) + [...]+ D (57)

> and it works fine.

> - Arne



Thu, 20 Jan 2005 09:10:00 GMT  
 QB 4.5 - Expression too complex

Quote:
> His answer wasn't there when I wrote mine.  There's a time lag in
> receiving newsgroup updates (at least with my ISP).

Sorry, I didn't know that - my provider (T-Online) only needs a few seconds
to update the NG, at least with my postings.


Thu, 20 Jan 2005 19:51:58 GMT  
 QB 4.5 - Expression too complex

Quote:
> Hi,
> I have an error in QB 4.5 when I'm trying to compile my program. I never had
> this error before. The Screen looks like this:

> -------------------------------------------------------------------------
> BC C:\QB\DCF.BAS/O/T/C:512;
> [...]
>  068A  01EA  IF Reserve = 1 THEN PRINT "aktiv  " ELSE PRINT "inaktiv"
>                                                  ^ Expression too complex
> [...]
> -------------------------------------------------------------------------

  Is that all on one line?  Try breaking it up like this:

IF Reserve = 1 THEN
  PRINT "aktiv  "
ELSE
  PRINT "inaktiv"
ENDIF

  And don't forget the ENDIF at the end...



Thu, 20 Jan 2005 14:16:11 GMT  
 
 [ 20 post ]  Go to page: [1] [2]

 Relevant Pages 

1. QB 4.0 Docs/QB 4.5 Wanted

2. want QB 4.5 QB 7.1 FOR FREE!!!

3. Where's QB.LIB in QB 4.5?

4. CRW 4.5 PRO and ODBC 2.0 ,VB 3.0 and Complex Query

5. QB 4.5: reading 16 bit from a port

6. Incorporating non-QBasic graphics into QB 4.5 programs

7. WTB: QB 4.5 Book!

8. QB 4.5 and CALL ABSOLUTE

9. Get command-line arguments in QB 4.5 ?

10. QB 4.5 versus VBDOS 1.0

11. Where to buy QB 4.5

12. Playing Midi files from QB 4.5

 

 
Powered by phpBB® Forum Software