Compiler switches

work even if they do not start on 1st column

Avra
Schreiberling
Avatar
Geschlecht:
Herkunft: Belgrade, Serbia
Alter: 54
Homepage: rs.linkedin.com/in…
Beiträge: 653
Dabei seit: 07 / 2002
Betreff:

Compiler switches

 · 
Gepostet: 16.06.2014 - 10:25 Uhr  ·  #1
Compiler manual says:
Zitat
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
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Compiler switches

 · 
Gepostet: 16.06.2014 - 11:11 Uhr  ·  #2
Hello Avra,

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

rolf
Avra
Schreiberling
Avatar
Geschlecht:
Herkunft: Belgrade, Serbia
Alter: 54
Homepage: rs.linkedin.com/in…
Beiträge: 653
Dabei seit: 07 / 2002
Betreff:

Re: Compiler switches

 · 
Gepostet: 16.06.2014 - 13:43 Uhr  ·  #3
:blob4: :blob5: Yipeeee! :blob5: :blob4:
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   58   72 · Page-Gen-Time: 0.043828s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI