Compiler switches

work even if they do not start on 1st column

Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Compiler switches

 · 
Posted: 16.06.2014 - 10:25  ·  #1
Compiler manual says:
Quote
The switches must start in the first column of a line.


I have worked with this limitation for many years, and my complex code looked ugly where I had to comply to this rule and avoid code indentation. However, in code example below {$X-} switch works even when intended in code:
Code
{ $D-} // do not step following code in debuger
procedure mDelaySim(const msec: word);
begin
  {$X-} // do not execute following code in simulator
  mDelay(msec);
  {$X+}
end;
{ $D+}


Does this mean that compiler finally doesn't care if we intend compiler switches to beautify our code? If so then manual should be updated.
:3some:

btw. I am aware of {$DEBDELAY} and "Short mDelay" menu switch in simulator, but there is code with many delays where my mDelaySim() is essential for simulation.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Compiler switches

 · 
Posted: 16.06.2014 - 11:11  ·  #2
Hello Avra,

this is correct. Thise note should be removed from the manual.

rolf
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Compiler switches

 · 
Posted: 16.06.2014 - 13:43  ·  #3
:blob4: :blob5: Yipeeee! :blob5: :blob4:
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   58   72 · Page-Gen-Time: 0.030009s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI