<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hello,<br>
looking at
<a class="moz-txt-link-freetext" href="https://www.freepascal.org/docs-html/prog/progsu126.html#x139-1400002.4.1">https://www.freepascal.org/docs-html/prog/progsu126.html#x139-1400002.4.1</a><br>
<br>
There is mentioned <span class="cmbx-10">"OPTION(opt)" with
comment: "</span><span class="cmbx-10">evaluates to <span
class="cmtt-10">TRUE </span>if a compiler option is set (mode
MacPas only). It is equivalent to the <span class="cmsy-10">{</span><span
class="tctt-1000">$</span><span class="cmtt-10">IFOPT </span><span
class="cmsy-10">} </span>directive."<br>
<br>
1. What is equivalent usage for {$IFOPT R+}?<br>
{$IF OPTION(R)} ?</span><span class="cmbx-10"><br>
<br>
2. What means comment "</span><span class="cmbx-10"><span
class="cmbx-10">(mode MacPas only)"?<br>
It will does not work for example for ObjPas mode? In my case
Compilation fails ... (with single </span></span><span
class="cmbx-10"><span class="cmbx-10"><span class="cmbx-10"></span><span
class="cmbx-10"><span class="cmbx-10">{$IF OPTION(R)}</span></span>
) -> Error: Compile time expression: Wanted Boolean but got
AnsiString at IF or ELSEIF<br>
Can this OPTION be enabled for all modes?<br>
<br>
3. Is there way how to do OR with {$IFOPT}?<br>
</span></span><span class="cmbx-10">if I use {$IF OPTION(R) OR </span><span
class="cmbx-10"><span class="cmbx-10">OPTION(D)</span>} I get:
"Error: Compile time expression: Wanted Boolean but got AnsiString
at IF or ELSEIF" ...<br>
So is there way how to do it with {$IFOPT R+D+}?<br>
<br>
Thanks<br>
-Laco.<br>
</span><span class="cmbx-10"><span class="cmbx-10"></span></span>
</body>
</html>