Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.pascal.misc

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-13-2010, 09:46 PM
Chris Burrows
Guest
 
Posts: n/a
Default Re: Virtual Pascal $define problem

"Robert AH Prins" <spamtrap@prino.org> wrote in message
news:8k8ftmFd9uU1@mid.individual.net...
>
> 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?
>


At the risk of stating the obvious: Ensure that you are changing *both*
instances of "q-h2wiki" to "h-h2wiki" in your code otherwise you might end
up with the declaration:

const
copyright: string[71] = moi + + '-2010' + opt;

Regards,
Chris Burrows
CFB Software
http://www.astrobe.com




Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 11-13-2010, 09:57 PM
Robert AH Prins
Guest
 
Posts: n/a
Default Virtual Pascal $define problem

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
--
Robert AH Prins
spamtrap(a)prino(d)org
Reply With Quote
  #3 (permalink)  
Old 11-14-2010, 11:04 AM
Marco van de Voort
Guest
 
Posts: n/a
Default Re: Virtual Pascal $define problem

["Followup-To:" header set to comp.lang.pascal.borland.]
On 2010-11-13, Robert AH Prins <spamtrap@prino.org> wrote:
> 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}


Does VP really process defines with dashes in it, or does it require (like
e.g. FPC) of defines to be identifiers and regard the rest as comment?

iow {$define q}

Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 07:47 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.