Thread: Just a question...
|
Replies:
3
-
Last Post:
Mar 20, 2017 2:30 PM
Last Post By: Remy Lebeau (Te...
|
|
|
Posts:
595
Registered:
2/12/10
|
|
Hello,
I want to port this function from Delphi to FreePascal,
the {$IfOpt O+} doesn't seem to work in FreePascal:
function CompilerOptimizationS: String;
begin
Result:= 'Compiler optimization is ' +
{$IfOpt O+}
'enabled'
{$Else}
'disabled'
{$EndIf}
end;
Thank you,
Amine Moulay Ramdane.
|
|
|
Posts:
9,442
Registered:
12/23/01
|
|
Amine wrote:
I want to port this function from Delphi to FreePascal, the
{$IfOpt O+} doesn't seem to work in FreePascal:
You should ask in the FreePascal forums instead:
http://forum.lazarus.freepascal.org/
Configuring FreePascal's optimizations is much more flexible than Delphi's:
http://www.freepascal.org/docs-html/prog/progsu58.html#x65-640001.2.58
So an all-encompassing {$IFOPT O+} may or may not make as much sense in FreePascal
as it does in Delphi. At the very least, are you putting FreePascal into
Delphi mode using {$Mode Delphi} before using {$IFOPT}?
--
Remy Lebeau (TeamB)
|
|
|
|
Posts:
595
Registered:
2/12/10
|
|
Amine wrote:
I want to port this function from Delphi to FreePascal, the
{$IfOpt O+} doesn't seem to work in FreePascal:
You should ask in the FreePascal forums instead:
http://forum.lazarus.freepascal.org/
Configuring FreePascal's optimizations is much more flexible than Delphi's:
http://www.freepascal.org/docs-html/prog/progsu58.html#x65-640001.2.58
So an all-encompassing {$IFOPT O+} may or may not make as much sense in FreePascal
as it does in Delphi. At the very least, are you putting FreePascal into
Delphi mode using {$Mode Delphi} before using {$IFOPT}?
--
Remy Lebeau (TeamB)
I have already set it with the Delphi mode in FreePascal..
The {$IfOpt O+} is not working in FreePascal, but it is working in Delphi.
Thank you,
Amine Moulay Ramdane.
|
|
|
|
Posts:
9,442
Registered:
12/23/01
|
|
Amine wrote:
I have already set it with the Delphi mode in FreePascal..
The {$IfOpt O+} is not working in FreePascal, but it is working
in Delphi.
Again, you should ask in the FreePascal forums instead.
--
Remy Lebeau (TeamB)
|
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us