Google

section i of routines in std.i

yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

functions in std.i - i

 
 
 
i86_primitives


             i86_primitives, file  
 
     sets FILE primitive data types to be native to Linux i86 machines.  

interpreted function, defined at i0/std.i   line 2027  
 
 
 
im_part


             im_part(z)  
 
     returns the imaginary part of its argument.  
     Unlike z.im, works if z is not complex (returns zero).  

interpreted function, defined at i0/std.i   line 658  
 
 
 
include


             #include "yorick_source.i"  
             require, filename  
             include, filename  
          or include, filename, now  
 
     #include is a parser directive, not a Yorick statement.  Use it  
     to read Yorick source code which you have saved in a file; the  
     file yorick_source.i will be read one line at a time, exactly as  
     if you had typed those lines at the keyboard.  The following  
     directories are searched (in this order) to find yorick_source.i:  
        .               (current working directory)  
	~/Yorick        (your personal directory of Yorick functions)  
	Y_SITE/include  (Yorick distribution library)  
	Y_SITE/contrib  (contributed source at your site)  
     To find out what is available in the Yorick/include directory,  
     type:  
         library  
     You can also type  
         Y_SITE  
     to find the name of the site directory at your site, go to the  
     include or contrib subdirectory, and browse through the *.i files.  
     This is a good way to learn how to write a Yorick program.  Be  
     alert for files like README as well.  
     The require function checks to see whether FILENAME has already  
     been included (actually whether any file with the same final  
     path component has been included).  If so, require is a no-op,  
     otherwise, the action is the same as the include function with  
     NOW == 1.  
     The include function causes Yorick to parse and execute FILENAME  
     immediately.  The effect is similar to the #include parser  
     directive, except the finding, parsing, and execution of FILENAME  
     occurs at runtime.  If the NOW argument is given and positive,  
     the include occurs immediately, if nil or 0, it occurs just before  
     the next line would have been parsed.  If NOW is negative, the  
     include file is pushed onto a stack, and will be popped off and  
     parsed when all pending input has been processed.  
     Unless you are writing a startup file, or have some truly bizarre  
     technical reason for using the include function, use #include  
     instead.  The functional form of include may involve recursive  
     parsing, which you will not be able to understand without deep  
     study.  Stick with #include.  

builtin function, documented at i0/std.i   line 1483  
SEE ALSO: set_path,   Y_SITE  
 
 
 
indgen


             indgen(n)  
          or indgen(start:stop)  
          or indgen(start:stop:step)  
 
     returns "index generator" list -- an array of longs running from  
     1 to N, inclusive.  In the second and third forms, the index  
     values specified by the index range are returned.  

builtin function, documented at i0/std.i   line 892  
SEE ALSO: span,   spanl,   array  
 
 
 
info


             info, expr  
 
     prints the data type and array dimensions of EXPR.  

interpreted function, defined at i0/std.i   line 157  
SEE ALSO: help,   print  
 
 
 
install_struct


             install_struct, file, struct_name  
          or install_struct, file, struct_name, size, align, order  

          or install_struct, file, struct_name, size, align, order, layout  
 
     installs the data type named STRUCT_NAME in the binary FILE.  In  
     the two argument form, STRUCT_NAME must have been built by one or  
     more calls to the add_member function.  In the 5 and 6 argument calls,  
     STRUCT_NAME is a primitive data type -- an integer type for the 5  
     argument call, and a floating point type for the 6 argument call.  
     The 5 argument form may also be used to declare opaque data types.  
     SIZE is the size of an instance in bytes, ALIGN is its alignment  
     boundary (also in bytes), and ORDER is the byte order.  ORDER is  
     1 for most significant byte first, -1 for least significant byte  
     first, and 0 for opaque (unconverted) data.  Other ORDER values  
     represent more complex byte permutations (2 is the byte order for  
     VAX floating point numbers).  If ORDER equals SIZE, then the data  
     type is not only opaque, but also must be read sequentially.  
     LAYOUT is an array of 7 long values parameterizing the floating  
     point format, [sign_address, exponent_address, exponent_size,  
     mantissa_address, mantissa_size, mantissa_normalized, exponent_bias]  
     (the addresses and sizes are in bits, reduced to MSB first order).  
     Use, e.g., nameof(float) for STRUCT_NAME to redefine the meaning  
     of the float data type for FILE.  

builtin function, documented at i0/std.i   line 2472  
SEE ALSO: add_variable,   add_member  
 
 
 
integ


             integ(y, x, xp)  
          or integ(y, x, xp, which)  
 
     See the interp function for an explanation of the meanings of the  
     arguments.  The integ function returns ypi which is the integral  
     of the piecewise linear curve (X(i), Y(i)) (i=1, ..., numberof(X))  
     from X(1) to XP.  The curve (X, Y) is regarded as constant outside  
     the bounds of X.  Note that X must be monotonically increasing or  

builtin function, documented at i0/std.i   line 987  
SEE ALSO: interp,   digitize,   span  
 
 
 
interp


             interp(y, x, xp)  
          or interp(y, x, xp, which)  
 
     returns yp such that (XP, yp) lies on the piecewise linear curve  
     (X(i), Y(i)) (i=1, ..., numberof(X)).  Points beyond X(1) are set  
     to Y(1); points beyond X(0) are set to Y(0).  The array X must be  
     one dimensional, have numberof(X)>=2, and be either monotonically  
     increasing or monotonically decreasing.  The array Y may have more  
     than one dimension, but dimension WHICH must be the same length as  
     X.  WHICH defaults to 1, the first dimension of Y.  WHICH may be  
     non-positive to count dimensions from the end of Y; a WHICH of 0  
     means the final dimension of Y.  The result yp has dimsof(XP)  
     in place of the WHICH dimension of Y (if XP is scalar, the WHICH  
     dimension is not present).  (The dimensions of the result are the  
     same as if an index list with dimsof(XP) were placed in slot  
     WHICH of Y.)  

builtin function, documented at i0/std.i   line 968  
SEE ALSO: integ,   digitize,   span  
 
 
 
is_array


             is_array(object)  
 
     returns 1 if OBJECT is an array data type (as opposed to a function,  
     structure definition, index range, I/O stream, etc.), else 0.  
     An array OBJECT can be written to or read from a binary file;  
     non-array Yorick data types cannot.  

builtin function, documented at i0/std.i   line 460  
SEE ALSO: is_func,   is_void,   is_range,   is_struct,  
is_stream  
 
 
 
is_func


             is_func(object)  
 
     returns 1 if OBJECT is a Yorick interpreted function, 2 if OBJECT  
     is a built-in (that is, compiled) function, else 0.  

builtin function, documented at i0/std.i   line 469  
SEE ALSO: is_array,   is_void,   is_range,   is_struct,  
is_stream  
 
 
 
is_range


             is_range(object)  
 
     returns 1 if OBJECT is an index range (e.g.-  3:5 or 11:31:2),  
     else 0.  

builtin function, documented at i0/std.i   line 483  
SEE ALSO: is_array,   is_func,   is_void,   is_struct,  
is_stream  
 
 
 
is_stream


             is_stream(object)  
 
     returns 1 if OBJECT is a binary I/O stream (usually a file), else 0.  
     The _read and _write functions work on object if and only if  
     is_stream returns non-zero.  Note that is_stream returns 0 for a  
     text stream -- you need the typeof function to test for those.  

builtin function, documented at i0/std.i   line 497  
SEE ALSO: is_array,   is_func,   is_void,   is_range,  
is_struct  
 
 
 
is_struct


             is_struct(object)  
 
     returns 1 if OBJECT is the definition of a Yorick struct, else 0.  
     Thus, is_struct(double) returns 1, but is_struct(1.0) returns 0.  

builtin function, documented at i0/std.i   line 490  
SEE ALSO: is_array,   is_func,   is_void,   is_range,  
is_stream  
 
 
 
is_void


             is_void(object)  
 
     returns 1 if OBJECT is nil (the one instance of the void data type),  
     else 0.  

builtin function, documented at i0/std.i   line 476  
SEE ALSO: is_array,   is_func,   is_range,   is_struct,  
is_stream