Changes between Version 5 and Version 6 of UseDirective
- Timestamp:
- 07/29/13 11:12:00 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseDirective
v5 v6 6 6 }}} 7 7 8 Specify a namespace contents to make available to this module8 Specify a namespace whose contents are made available to this module. 9 9 10 10 When using the first form if the compiler cannot immediately locate the namespace,[[BR]] … … 34 34 35 35 == Platform == 36 For .Net 37 there arefive implicit "use" directives at the top of a Cobra program:36 '''For .Net''': 37 There are assumed five implicit "use" directives at the top of a Cobra program: 38 38 {{{ 39 39 #!cobra … … 44 44 use Cobra.Core 45 45 }}} 46 This gives default access to The core of the .Net objects and the cobra46 This gives default access to the core of the .Net objects and the cobra 47 47 runtime Library, !CobraCore. 48 48 … … 63 63 #!cobra 64 64 use Foo.Bar 65 # On .Net will look for namespace in Foo.Bar.dll ifnot already available65 # On .Net will look for the namespace in file Foo.Bar.dll if it is not already available 66 66 }}} 67 68 '''For Java''': 69 The namespace names specified refer to java package names (first (caps) letter downcased). 70 71 Similarly the assumed implicit directives are 72 {{{ 73 use Java.Lang 74 use Java.Io 75 use Java.Util 76 use Java.Text 77 use Cobra.Core 78 }}} 79 which correspond to the most common core java library packages (i.e java.{lang,io,util,text}) and the (java ) cobra runtime library. 80 (These core library packages are read from the standard java runtime system jarfile rt.jar). 81 82 The <library-name> refers to a Java jar file (no .jar extension is expected or allowed). 83 84 The jarfile name is the namespace with ".jar" appended searched for in the places given by the CLASSPATH env variable. 85 67 86 68 87 == Examples == … … 95 114 96 115 In most cases this syntax means you dont need to specify the commandline 97 -reference switch 116 -reference switch to provide the filename for a referenced namespace. 98 117 99 118