Code Syntax Error Riddle

Two files, each with its own “.Initalize”. In one the line ( openform "Form_A") is tagged as a syntax error. The .Initialize in the other file has the same code (although its own form name) and gets an OK.
The error survives a manual respelling (the original spelling was brought forward from the previous v6 file).

Where should I hunt for the problem?

TIA

Try commenting that line out, to verify that that is in fact where the error is.

The syntax error has not to be exactly in that line; it can be in the previous or the following line. So commenting out this line is a good advice to locate the real cause of the error.

I tried, line by line, all 13 of them, and the “Syntax Error” remains. Oher things which don’t work in this window are:
1.) CMD-D should single step… … it doesn’t
2.) CMD-/ should toggle back/forth “Comment”. For a line already commented out, it simply adds a “//” to the existing "/*

(I should also say that v10 is surprizingly sluggish, often taking 5-10 seconds to execute a simple command.)

If I was a betting man I would bet that there is a missing closing quote in some previous line. :thinking:

Read 'em and weep, Gary . (The other things not working here is that after the “/*” is removed, the lines are still green.)

global gwho, gNish, gwindow,
openform “Form_A”
openform “Form_B”
gNish=“x”
gwho=""
hide
Field Out
Select today()-Out ≤ 365
Field Age
«Age» = ?(Category≠"Lost",?(In=0,today()-Out,In-Out), 0)
Field Name
RemoveSummaries 7
show

The problem is the extra comma at the end of the first line. Because of that, it thinks openform (on line 2) is the name of a global variable. Then it sees a quote character where it expects a statement, and boom, that’s a syntax error. Note that this also would have been a syntax error in Panorama 6.

Not the same code.

1 Like

Coding sure sharpens the eyesight. Thanks, all

I’m not going to cry too much since it was a comma instead of a quote. Still, close enough.

1 Like