Compiler switch -az in source file

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
SHirsch
Posts: 282
Joined: Tue Jan 30, 2018 8:23 am

Compiler switch -az in source file

Post by SHirsch »

Hi,
I have a lib that has compiler switch -az set (use zero based arrays).
Now I would like to import the source files of this lib into a another lib. But there -az is not set.
Is it somehow possible to set compiler switches for files or parts of code?
Something like this

Code: Select all

#pragma compiler enable -az
... code with zero based arrays
#pragma compiler restore -az
Regards,
Stefan
User avatar
robert
Posts: 4258
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Compiler switch -az in source file

Post by robert »

Stefan,

This is still on the todo list

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
SHirsch
Posts: 282
Joined: Tue Jan 30, 2018 8:23 am

Compiler switch -az in source file

Post by SHirsch »

Hi Robert,

ok, will keep it as separate lib until then.

Regards,
Stefan
User avatar
SHirsch
Posts: 282
Joined: Tue Jan 30, 2018 8:23 am

Compiler switch -az in source file

Post by SHirsch »

Just for resolving this (because I searched it again).
Now it is possible:
#pragma options( "az", on )
....
#pragma options( "az", default )
Post Reply