Wiki

Changes between Version 5 and Version 6 of UseDirective

Show
Ignore:
Timestamp:
07/29/13 11:12:00 (11 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseDirective

    v5 v6  
    66}}} 
    77 
    8 Specify a namespace contents to make available to this module 
     8Specify a namespace whose contents are made available to this module. 
    99 
    1010When using the first form if the compiler cannot immediately locate the namespace,[[BR]] 
     
    3434 
    3535== Platform == 
    36 For .Net  
    37 there are five implicit "use" directives at the top of a Cobra program: 
     36'''For .Net''': 
     37There are assumed five implicit "use" directives at the top of a Cobra program: 
    3838{{{ 
    3939#!cobra 
     
    4444use Cobra.Core 
    4545}}} 
    46 This gives default access to The core of the .Net objects and the cobra  
     46This gives default access to the core of the .Net objects and the cobra  
    4747runtime Library, !CobraCore.  
    4848 
     
    6363#!cobra 
    6464use Foo.Bar  
    65 # On .Net will look for namespace in Foo.Bar.dll if not already available 
     65# On .Net will look for the namespace in file Foo.Bar.dll if it is not already available 
    6666}}} 
     67 
     68'''For Java''': 
     69The namespace names specified refer to java package names (first (caps) letter downcased). 
     70 
     71Similarly the assumed implicit directives are  
     72{{{ 
     73use Java.Lang 
     74use Java.Io 
     75use Java.Util 
     76use Java.Text 
     77use Cobra.Core 
     78}}} 
     79which 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 
     82The <library-name> refers to a Java jar file (no .jar extension is expected or allowed). 
     83 
     84The jarfile name is the namespace with ".jar" appended searched for in the places given by the CLASSPATH env variable. 
     85 
    6786 
    6887== Examples == 
     
    95114 
    96115In 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. 
    98117 
    99118