Recent

Author Topic: MACPAS mode vs OBJFPC mode  (Read 4518 times)

Gilles

  • New Member
  • *
  • Posts: 37
MACPAS mode vs OBJFPC mode
« on: October 18, 2018, 09:05:09 am »
I'm coming, slowly but surely, to Object Pascal…

I used to use {$MODE MACPAS}
but for ObjectPascal, I must use {$MODE OBJFPC}

And so : in MACPAS there was a very very very usefull directive : {$SETC bidule := TRUE}
which was invoqued later by {$IFC bidule} … {$ENDC}

is there any way to have the equivalent under OBJFPC ?
TurboPascal -> ThinkPascal -> CodeWarrior -> XCode with FPC -> (Well-deserved) Retirement (but not yet, not yet…)

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: MACPAS mode vs OBJFPC mode
« Reply #1 on: October 18, 2018, 10:03:43 am »
If you read the users guide you will see how to do that:
https://www.freepascal.org/docs-html/current/prog/progsu71.html#x78-770001.2.71
https://www.freepascal.org/docs-html/current/prog/progsu127.html#x140-1410002.4.1
Code: Pascal  [Select][+][-]
  1. {$MACRO ON}{$Define Bidule:=1}
  2. begin
  3.   {$If Bidule = 1}
  4.   writeln(true);
  5.   {$else}
  6.   writeln(false);  
  7.   {$ifend}
  8. end.
« Last Edit: October 18, 2018, 10:11:28 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Gilles

  • New Member
  • *
  • Posts: 37
Re: MACPAS mode vs OBJFPC mode
« Reply #2 on: October 18, 2018, 12:55:01 pm »
OK Merci  :)
it works

so many docs to read… so few time to do it…

done : 15588 occurences changed…
« Last Edit: October 18, 2018, 04:58:22 pm by Gilles »
TurboPascal -> ThinkPascal -> CodeWarrior -> XCode with FPC -> (Well-deserved) Retirement (but not yet, not yet…)

 

TinyPortal © 2005-2018