up previous next

Global Aliases

A global alias for a package is formed by using the command Alias during a CoCoA session. (Local aliases are formed with the same command, but are declared inside a package. They are for use only within the package.) The syntax for Alias is Alias binding, ..., binding; where a binding has the form
  identifier := $PackageName
The function Aliases prints a list of the global aliases.

example

    
Aliases();

H      = $cocoa/help
IO     = $cocoa/io
GB     = $cocoa/gb
HP     = $cocoa/hp
HL     = $cocoa/hilop
List   = $cocoa/list
Mat    = $cocoa/mat
Latex  = $cocoa/latex
LaTeX  = $cocoa/latex
Toric  = $cocoa/toric
Coclib = $cocoa/coclib
TT     = $abc
-------------------------------
Alias  My := $my_package, 
      Old := $my_package/old_version;
Aliases();

HP      = $cocoa/hp
BinRepr = $cocoa/binrepr
SpPoly  = $cocoa/sppoly
HL      = $cocoa/hilop
H       = $cocoa/help
My      = $my_package
Old     = $my_package/old_version
-------------------------------
        
    
Note: global aliases cannot be used in function definitions. This is to force independence of context. Inside a function, one must use the complete package name. For example, $cocoa/gb.Step(M)M is a valid statement inside a function, but not GB.Step(M).