With the exception of one moment! Empty strings are still allowed. Do you see any practical meaning in this?
Code: Select all
PROCEDURE {code} Proc1"", "", "", 9, "", "" ; (* <= now it compiles! *)
Code: Select all
PROCEDURE {code} Proc1"", "", "", 9, "", "" ; (* <= now it compiles! *)
the empty string produce nothing,Josef Templ wrote:# empty string:
Why should we add any code for testing such an exotic case?
And why should it be considered wrong at the first place?
- Josef
Code: Select all
procedures in general has very specific application, and a big programmer's accuracy is necessary here. Therefore it is good when a translator will warn of a meaningless design.
we need only forbidden empty string, it's meaningless in the code.Josef Templ wrote:My understanding is that strings in GetCode are mainly supported because once there was a version of BlackBox that
translated to C code and code procedures were strings of C code.
For the i386 native code compiler you would not use strings for code procedures.
- Josef
I think these empty strings useless and make source code dirty,hard to read;luowy wrote:It has a well-defined meaning and it does not cause any problems and it is not used at all.
Therefore I strongly believe that it is not worth extra code for checking it and it is not worth extra docu for defining it to be illega
Code: Select all
PROCEDURE {code} Proc1"", "", "", 9, "", "" ;
Code: Select all
PROCEDURE {code} Proc1 9;
Code: Select all
....
ELSIF (cx.typ.form = String8)&(cx.conval.intval2 >1)THEN
....
I know you are maintaining the Ofront at same time, I have no experience about it, you choice may be good for it;You can even construct (theoretical) cases where it may be convenient,
for example if you generate a C code procedure line by line from some source text.
Then you don't have to check for this special case.