Directive for the compiler version [Solved]

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Directive for the compiler version [Solved]

#1 Post by Dany » 07 Feb 2017 21:28

Does a directive exists for the compilerversion to be able to use e.g.

Code: Select all

{$IFDEF VER7}
in code (conditional compilation). The reason for this is some added routines in some new versions of the compiler, which can collide with self made routines with the same name...
Thanks in advance! :D
Last edited by Dany on 13 Feb 2017 15:25, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Directive for the compiler version

#2 Post by janni » 08 Feb 2017 02:22

How about

Code: Select all

{$IFDEF __MIKROPASCAL_PRO_FOR_PIC_BUILD_700__}
? :)

BTW, while polishing the Help file I've corrected also the 'Predefined Globals and Constants' chapter - if you haven't read it before, have a look at this post.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Directive for the compiler version

#3 Post by Dany » 08 Feb 2017 12:02

janni wrote:How about

Code: Select all

{$IFDEF __MIKROPASCAL_PRO_FOR_PIC_BUILD_700__}
? :)

BTW, while polishing the Help file I've corrected also the 'Predefined Globals and Constants' chapter - if you haven't read it before, have a look at this post.
Thanks Janni.
Was that directive also present in older mP versions (I still use 6.50 and I can not find the directive) or was it implemented from v7.00 onwards?
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Directive for the compiler version

#4 Post by filip » 08 Feb 2017 15:43

Hi,

This was introduced in the 7.0.0 version.

Regards,
Filip.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Directive for the compiler version

#5 Post by Dany » 08 Feb 2017 16:21

filip wrote:Hi,

This was introduced in the 7.0.0 version.

Regards,
Filip.
Thanks!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Directive for the compiler version

#6 Post by Dany » 09 Mar 2017 20:35

janni wrote:How about

Code: Select all

{$IFDEF __MIKROPASCAL_PRO_FOR_PIC_BUILD_700__}
? :)

BTW, while polishing the Help file I've corrected also the 'Predefined Globals and Constants' chapter - if you haven't read it before, have a look at this post.
Thanks Janni.

Perhaps for the help file also: the directive __MIKROPASCAL_PRO_FOR_PIC__ also exists. (version independant, but only existing from v7.00 onwards).
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Directive for the compiler version [Solved]

#7 Post by janni » 09 Mar 2017 22:52

It is in Help for v 7.00 of mP PRO (though as {$IFDEF __MIKROBASIC_PRO_FOR_PIC__}...{$ENDIF} :wink: ).

What the Help is missing is the PIC16 enhanced family define:

Code: Select all

{$IFDEF P16-Enh}...{$ENDIF}                     // if enhanced PIC16 family
mistakenly defined as P16-Enh instead of P16_Enh which makes it unusable for mC users :mrgreen: .

Post Reply

Return to “mikroPascal PRO for PIC General”