= Cobra Compiler Directives = Compiler directives are options, instructions or hints provided to compiler[[BR]] from within code files. These may be items also provided as commandline args. The various cobra Compiler directives are[[BR]] @args[[BR]] @ref[[BR]] [HelpDirective @help][[BR]] @number[[BR]] @platform[[BR]] @error[[BR]] @warning[[BR]] @throw <---for internal use by cobra..[[BR]] '''@args'''[[BR]] Specifies the provision of a (cobra compiler commandline) arg.[[BR]] The option follows the @args as if given on the compiler commandline. e.g.[[BR]] {{{ @args -t:winexe }}} specify a compiler option giving a commandline arg that indicates that the current assembly should be compiled as a Windows Executable[[BR]] {{{@args -lib:'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0' }}} specifies a search directory for the cobra compiler to look in to find any referenced assemblies.[[BR]] '''@ref'''[[BR]] Indicates explicitly an assembly filename for the resolution of (used) references. e.g.[[BR]] {{{ @ref "PresentationFramework" }}} specifies referencing "PresentationFramework" assembly from GAC which could otherwise have been given as -ref:"PresentationFramework" on the commandline[[BR]] {{{ @ref 'c:\somedirectory\validAssembly.exe' @ref 'c:\somedirectory\validAssembly.dll' }}} specifies referencing assemblies by giving absolute paths to both .exe and .dll files[[BR]] '''@help''' See HelpDirective '''@number'''[[BR]] Set the actual numeric type for any uses of both the 'Number' type and the default numeric type for any fractional literals (such as '1.0').[[BR]] This usually defaults to Decimal. ( see CommandLine option 'Number') See http://cobra-language.com/trac/cobra/wiki/Troubleshooting '''@platform'''[[BR]] Directive to specify that this source is specifically intended (only) for a specific platform. Presumably the code uses libraries or API's only available on that platform. If the platform directive and the compiler option backend settings are not compatible compilation will be aborted. Values may be one of : * any - default - build on any platform (explicitly) * portable - (future) build for a 'portable' platform * clr - build for a CLR platform ( .Net - Windows and mono) * jvm - build for a jvm platform * objc - (future) build for an objective-C platform e.g. {{{ @platform jvm # build only on/for jvm platform @platform any # same as default }}} Additional (or different) platforms may be supported (or completed) in the future.