Robert AH Prins
2010-11-13 22:57:15 UTC
Hi all,
I'm adding a new program to a suite of Virtual Pascal (V2.1 Build 279)
programs and that means adding a bit of code to generate the Copyright
string:
{$define q-h2wiki}
const opt = '/' + {Compiler options in use}
{$ifopt A+} 'A+' {$else} 'A-' {$endif} +
{$ifopt B+} 'B+' {$else} 'B-' {$endif} +
{$ifopt D+} 'D+' {$else} 'D-' {$endif} +
{$ifopt H+} 'H+' {$else} 'H-' {$endif} +
{$ifopt I+} 'I+' {$else} 'I-' {$endif} +
{$ifopt J+} 'J+' {$else} 'J-' {$endif} +
{$ifopt P+} 'P+' {$else} 'P-' {$endif} +
{$ifopt Q+} 'Q+' {$else} 'Q-' {$endif} +
{$ifopt R+} 'R+' {$else} 'R-' {$endif} +
{$ifopt S+} 'S+' {$else} 'S-' {$endif} +
{$ifopt T+} 'T+' {$else} 'T-' {$endif} +
{$ifopt V+} 'V+' {$else} 'V-' {$endif} +
{$ifopt W+} 'W+' {$else} 'W-' {$endif} +
{$ifopt X+} 'X+' {$else} 'X-' {$endif} +
{$ifopt Z+} 'Z+' {$else} 'Z-' {$endif} + '';
const
moi = ' Copyright (C) Robert AH Prins ';
const
copyright: string[71] = moi +
{$ifdef lift} '1987' {$endif}
{$ifdef newlift} '2000' {$endif}
{$ifdef dayform} '1996' {$endif}
{$ifdef h-h2rtf} '1996' {$endif}
{$ifdef dat2txt} '2002' {$endif}
{$ifdef chkdat} '2002' {$endif}
{$ifdef get-aud} '2002' {$endif}
{$ifdef q-h2wiki} '2010' {$endif}
{$ifdef dat2csv} '2003' {$endif} + '-2010' + opt;
begin
writeln(copyright);
end.
The problem is that if I change "q-h2wiki" to what it should be,
"h-h2wiki", the compiler gives me an error '85' Semicolon expected, and
I haven't got a clue as to the why, unless there is some interaction
between the h-h2rtf and h-h2wiki defines.
Can anyone give me a clue?
Thanks,
Robert
I'm adding a new program to a suite of Virtual Pascal (V2.1 Build 279)
programs and that means adding a bit of code to generate the Copyright
string:
{$define q-h2wiki}
const opt = '/' + {Compiler options in use}
{$ifopt A+} 'A+' {$else} 'A-' {$endif} +
{$ifopt B+} 'B+' {$else} 'B-' {$endif} +
{$ifopt D+} 'D+' {$else} 'D-' {$endif} +
{$ifopt H+} 'H+' {$else} 'H-' {$endif} +
{$ifopt I+} 'I+' {$else} 'I-' {$endif} +
{$ifopt J+} 'J+' {$else} 'J-' {$endif} +
{$ifopt P+} 'P+' {$else} 'P-' {$endif} +
{$ifopt Q+} 'Q+' {$else} 'Q-' {$endif} +
{$ifopt R+} 'R+' {$else} 'R-' {$endif} +
{$ifopt S+} 'S+' {$else} 'S-' {$endif} +
{$ifopt T+} 'T+' {$else} 'T-' {$endif} +
{$ifopt V+} 'V+' {$else} 'V-' {$endif} +
{$ifopt W+} 'W+' {$else} 'W-' {$endif} +
{$ifopt X+} 'X+' {$else} 'X-' {$endif} +
{$ifopt Z+} 'Z+' {$else} 'Z-' {$endif} + '';
const
moi = ' Copyright (C) Robert AH Prins ';
const
copyright: string[71] = moi +
{$ifdef lift} '1987' {$endif}
{$ifdef newlift} '2000' {$endif}
{$ifdef dayform} '1996' {$endif}
{$ifdef h-h2rtf} '1996' {$endif}
{$ifdef dat2txt} '2002' {$endif}
{$ifdef chkdat} '2002' {$endif}
{$ifdef get-aud} '2002' {$endif}
{$ifdef q-h2wiki} '2010' {$endif}
{$ifdef dat2csv} '2003' {$endif} + '-2010' + opt;
begin
writeln(copyright);
end.
The problem is that if I change "q-h2wiki" to what it should be,
"h-h2wiki", the compiler gives me an error '85' Semicolon expected, and
I haven't got a clue as to the why, unless there is some interaction
between the h-h2rtf and h-h2wiki defines.
Can anyone give me a clue?
Thanks,
Robert
--
Robert AH Prins
spamtrap(a)prino(d)org
Robert AH Prins
spamtrap(a)prino(d)org