yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

functions in std.i - c

 
 
 
call


             call, subroutine(arg1, arg2, arg3, arg4, arg5  
                              arg6, arg7, arg8);  
 
     allows a SUBROUTINE to be called with a very long argument list  
     as an alternative to:  
          subroutine, arg1, arg2, arg3, arg4, arg5,  
            arg6, arg7, arg8;  
     Note that the statement  
          subroutine(arg1, arg2, arg3, arg4, arg5,  
                     arg6, arg7, arg8);  
     will print the return value of subroutine, even if it is nil.  
     If invoked as a function, call simply returns its argument.  
interpreted function, defined at i0/std.i   line 2926  
 
 
 
catch


             catch(category)  
 
     Catch errors of the specified category.  Category may be -1 to  
     catch all errors, or a bitwise or of the following bits:  
        0x01 math errors (SIGFPE, math library)  
        0x02 I/O errors  
        0x04 keyboard interrupts (e.g.- control C interrupt)  
        0x08 other compiled errors (YError)  
        0x10 interpreted errors (error)  
     Use catch by placing it in a function before the section of code  
     in which you are trying to catch errors.  When catch is called,  
     it always returns 0, but it records the virtual machine program  
     counter where it was called, and longjumps there if an error is  
     detected.  The most recent matching call to catch will catch the  
     error.  Returning from the function in which catch was called  
     pops that call off the list of catches the interpreter checks.  
     To use catch, place the call near the top of a function:  
        if (catch(category)) {  
          ......  
        }  
        ......  
     If an error with the specified category occurs in the "protected"  
     code, the program jumps back to the point of the catch and acts  
     as if the catch function had returned 1 (remember that when catch  
     is actually called it always returns 0).  
     In order to lessen the chances of infinite loops, the catch is  
     popped off the active list if it is actually used, so that a  
     second error will *not* be caught.  Often, this is only desirable  
     for the error handling code itself -- if you want to re-execute  
     the "protected" code, do this, and take care of the possibility  
     of infinite loops in your interpreted code:  
        while (catch(category)) {  
          ......  
        }  
        ......  
     After an error has been caught, the associated error message  
     (what would have been printed had it not been caught) is left  
     in the variable catch_message.  
builtin function, documented at i0/std.i   line 2681  
SEE ALSO: error  
 
 
 
cd


             cd, directory_name  
          or cd(directory_name)  
 
     change current working directory to DIRECTORY_NAME, returning  
     the expanded path name (i.e.- with leading environment variables,  
     ., .., or ~ replaced by the actual pathname).  If called as a  
     function, returns nil to indicate failure, otherwise failure  
     causes a Yorick error.  
builtin function, documented at i0/std.i   line 1678  
SEE ALSO: lsdir,   mkdir,   rmdir,   get_cwd,   get_home,  
get_env,   get_argv  
 
 
 
ceil


             ceil(x)  
 
     returns the smallest integer not less than x (no-op on integers).  
builtin function, documented at i0/std.i   line 662  
SEE ALSO: floor  
 
 
 
close


             close, f  
 
     closes the I/O stream F (returned earlier by the open function).  
     If F is a simple variable reference (as opposed to an expression),  
     the close function will set F to nil.  If F is the only reference  
     to the I/O stream, then "close, f" is equivalent to "f= []".  
     Otherwise, "close, f" will close the file (so that subsequent  
     I/O operations will fail) and print a warning message about the  
     outstanding ("stale") references.  
builtin function, documented at i0/std.i   line 1352  
SEE ALSO: open,   read,   write,   rdline,   bookmark,   backup,  
save,   restore,   rename,   remove  
 
 
 
close102


             close102  is a keyword for createb or updateb,  
             open102   is a keyword for openb or updateb  
             close102_default   is a global variable (initially 0)  
               ***Do not use close102_default -- use at_pdb_close  
                  -- this is for backward compatibility only***  
             close102=1  means to close the PDB file "Major-Order:102"  
             close102=0  means close it "Major-Order:101"  
                if not specified, uses 1 if close102_default non-zero,  
                otherwise the value specified in at_pdb_close  
             open102=1   means to ignore what the PDB file says internally,  
                         and open it as if it were "Major-Order:102"  
             open102=0   (the default) means to assume the PDB file is  
                         correctly writen  
             open102=2   means to assume that the file is incorrectly  
                         written, whichever way it is marked  
             open102=3   means to ignore what the PDB file says internally,  
                         and open it as if it were "Major-Order:101"  
 
     The PDB file format comes in two styles, "Major-Order:101", and  
     "Major-Order:102".  Yorick interprets these correctly by default,  
     but other codes may ignore them, or write them incorrectly.  
     Unlike Yorick, not all codes are able to correctly read both  
     styles.  If you are writing a file which needs to be read by  
     a "102 style" code, create it with the close102=1 keyword.  
     If you notice that a file you though was a history file isn't, or  
     that the dimensions of multi-dimensional variables are transposed  
     from the order you expected, the code which wrote the file probably  
     blew it.  Try openb("filename", open102=2).  The choices 1 and 3  
     are for cases in which you know the writing code was supposed to  
     write the file one way or the other, and you don't want to be  
     bothered.  
     The open102 and close102 keywords, if present, override the  
     defaults in the variables at_pdb_open and at_pdb_close.  
keyword,  defined at i0/std.i   line 1925  
SEE ALSO: at_pdb_open,   at_pdb_close  
 
 
 
close102_default


 close102_default  
 
keyword,  defined at i0/std.i   line 1925  
SEE close102  
 
 
 
collect


             result= collect(f, name_string)  
 
     scans through all records of the history file F accumulating the  
     variable NAME_STRING into a single array with one additional  
     index varying from 1 to the number of records.  
     NAME_STRING can be either a simple variable name, or a name  
     followed by up to four simple indices which are either nil, an  
     integer, or an index range with constant limits.  (Note that  
     0 or negative indices count from the end of a dimension.)  
     Examples:  
        collect(f, "xle")        -- collects the variable f.xle  
        collect(f, "tr(2,2:)")   -- collects f.tr(2,2:)  
        collect(f, "akap(2,-1:0,)") -- collects f.akap(2,-1:0,)  
                     (i.e.- akap in the last two values of its  
                            second index)  
interpreted function, defined at i0/std.i   line 1847  
SEE ALSO: get_times  
 
 
 
conj


             conj(z)  
 
     returns the complex conjugate of its argument.  
builtin function, documented at i0/std.i   line 690  
 
 
 
copyright


             copyright, (no) warranty  
 
     Copyright (c) 1996.  The Regents of the University of California.  
                   All rights reserved.  
     Yorick is provided "as is" without any warranty, either expressed or  
     implied.  For a complete statement, type:  
        legal  
     at the Yorick prompt.  
keyword,  defined at i0/std.i   line 72  
SEE ALSO: legal  
 
 
 
cos


 cos  
 
builtin function, documented at i0/std.i   line 518  
SEE sin  
 
 
 
cosh


 cosh  
 
builtin function, documented at i0/std.i   line 557  
SEE sinh  
 
 
 
cray_primitives


             cray_primitives, file  
 
     sets FILE primitive data types to be native to Cray 1, XMP, and YMP.  
interpreted function, defined at i0/std.i   line 2136  
 
 
 
create


             f= create(filename)  
 
     is a synonym for       f= open(filename, "w")  
     Creates a new text file FILENAME, destroying any existing file of  
     that name.  Use the write function to write into the file F.  
interpreted function, defined at i0/std.i   line 1343  
SEE ALSO: write,   close,   open  
 
 
 
createb


             file= createb(filename)  
          or file= createb(filename, primitives)  
 
     creates FILENAME as a PDB file in "w+b" mode, destroying any  
     existing file by that name.  If the PRIMITIVES argument is  
     supplied, it must be the name of a procedure that sets the  
     primitive data types for the file.  The default is to create  
     a file with the native primitive types of the machine on which  
     Yorick is running.  The following PRIMITIVES functions are  
     predefined:  
        sun_primitives    -- appropriate for Sun, HP, IBM, and  
                             most other workstations  
        sun3_primitives   -- appropriate for old Sun-2 or Sun-3  
        dec_primitives    -- appropriate for DEC (MIPS) workstations, Windows  
        alpha_primitives  -- appropriate for DEC alpha workstations  
        sgi64_primitives  -- appropriate for 64 bit SGI workstations  
        cray_primitives   -- appropriate for Cray 1, XMP, and YMP  
        mac_primitives    -- appropriate for MacIntosh  
        macl_primitives   -- appropriate for MacIntosh, 12-byte double  
        i86_primitives    -- appropriate for Linux i86 machines  
        pc_primitives     -- appropriate for IBM PC  
        vax_primitives    -- appropriate for VAXen only (H doubles)  
        vaxg_primitives   -- appropriate for VAXen only (G doubles)  
        xdr_primitives    -- appropriate for XDR files  
interpreted function, defined at i0/std.i   line 2058  
SEE ALSO: openb,   updateb,   cd,   save,   add_record,  
set_filesize,   set_blocksize,   close102,  
close102_default,   at_pdb_open,   at_pdb_close  
 
 
 
csch


 csch  
 
interpreted function, defined at i0/std.i   line 567  
SEE sech