1 | | Compiler directives are options, instructions, hints provided to compiler[[BR]] |
2 | | from with in code files. especially in cobra they are much more than[[BR]] |
3 | | #define,#if of c,c++,c#. In cobra one can pass arguments to compiler[[BR]] |
4 | | from within code file. which otherwise needs to be passed from commandline.[[BR]] |
| 1 | = Cobra Compiler Directives = |
| 2 | |
| 3 | Compiler directives are options, instructions or hints provided to compiler[[BR]] |
| 4 | from within code files. These may be items also provided as commandline args. |
33 | | 1)@ref "PresentationFramework"[[BR]] |
34 | | is a example of referencing "PresentationFramework" assembly from GAC which [[BR]] |
35 | | would otheriwse have been -ref:"PresentationFramework" on commandline[[BR]] |
36 | | 2) @ref 'c:\somedirectory\validAssembly.exe'[[BR]] |
37 | | 3) @ref 'c:\somedirectory\validAssembly.dll'[[BR]] |
38 | | above two examples reference assemblies by giving absolute paths for both .exe and .dll[[BR]] |
39 | | [[BR]] |
40 | | [[BR]] |
41 | | [[BR]] |
| 37 | Indicates explicitly an assembly filename for the resolution of (used) references. |
| 38 | |
| 39 | e.g.[[BR]] |
| 40 | {{{ |
| 41 | @ref "PresentationFramework" |
| 42 | }}} |
| 43 | specifies referencing "PresentationFramework" assembly from GAC which |
| 44 | could otherwise have been given as -ref:"PresentationFramework" on the commandline[[BR]] |
| 45 | {{{ |
| 46 | @ref 'c:\somedirectory\validAssembly.exe' |
| 47 | @ref 'c:\somedirectory\validAssembly.dll' |
| 48 | }}} |
| 49 | specifies referencing assemblies by giving absolute paths to both .exe and .dll files[[BR]] |
| 50 | |
| 51 | |
| 52 | |
43 | | 1)http://cobra-language.com/forums/viewtopic.php?f=4&t=810&p=4195#p4125 |
44 | | [[BR]] |
45 | | [[BR]] |
46 | | [[BR]] |
47 | | [[BR]] |
| 54 | Directive to generate an HTML help file for a given expression, statement or declaration.[[BR]] |
| 55 | The output file is intended to give the developer: |
| 56 | * information about the topic in general |
| 57 | * interfaces to types |
| 58 | * a link to the Cobra wiki where appropriate |
| 59 | * a link to the specific type's documentation on the web, where determinable |
| 60 | * ready-made search links |
| 61 | |
| 62 | See http://cobra-language.com/forums/viewtopic.php?f=4&t=810&p=4195#p4125 |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
49 | | 1)http://cobra-language.com/trac/cobra/wiki/Troubleshooting |
| 70 | 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]] |
| 71 | |
| 72 | This usually defaults to Decimal. |
| 73 | ( see CommandLine option 'Number') |
| 74 | |
| 75 | |
| 76 | See http://cobra-language.com/trac/cobra/wiki/Troubleshooting |
| 77 | |
| 78 | |
| 79 | |
| 80 | '''@platform'''[[BR]] |
| 81 | Directive to specify that this source is specifically intended (only) for a specific platform. |
| 82 | Presumably the code uses libraries or API's only available on that platform. |
| 83 | If the platform directive and the compiler option backend settings are not compatible compilation will be aborted. |
| 84 | |
| 85 | Values may be one of : |
| 86 | * any - default - build on any platform (explicitly) |
| 87 | * portable - (future) build for a 'portable' platform |
| 88 | * clr - build for a CLR platform ( .Net - Windows and mono) |
| 89 | * jvm - build for a jvm platform |
| 90 | * objc - (future) build for an objective-C platform |
| 91 | |
| 92 | |
| 93 | e.g. |
| 94 | {{{ |
| 95 | @platform jvm |
| 96 | # build only on/for jvm platform |
| 97 | |
| 98 | @platform any |
| 99 | # same as default |
| 100 | }}} |
| 101 | |
| 102 | Additional (or different) platforms may be supported (or completed) in the future. |