Wiki
Version 3 (modified by RIGHT_THEN, 13 years ago)

--

Compiler directives are options, instructions, hints provided to compiler
from with in code files. especially in cobra they are much more than
#define,#if of c,c++,c#. In cobra one can pass arguments to compiler
from within code file. which otherwise needs to be passed from commandline.

various cobra Compiler directives are

@args
@number
@ref
@help
@throw <---for internal use by cobra..
@error
@warning




@args
1) @args -t:winexe

is a example of specifing that current assembly shouldbe compiled as
Windows Executable

2) @args -lib:'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0'

is a example of specifing search directory for assemblies by cobra compiler to find the referenced assemblies.




@ref

1)@ref "PresentationFramework?"

is a example of referencing "PresentationFramework?" assembly from GAC which
would otheriwse have been -ref:"PresentationFramework" on commandline

2) @ref 'c:\somedirectory\validAssembly.exe'
3) @ref 'c:\somedirectory\validAssembly.dll'

above two examples reference assemblies by giving absolute paths for both .exe and .dll




@help

1) http://cobra-language.com/forums/viewtopic.php?f=4&t=810&p=4195#p4125





@number

1)http://cobra-language.com/trac/cobra/wiki/Troubleshooting