Group: | Information and Control |
See also: | list size |
Function: | comp | |
Description: | Checks whether an object has a specific component or not. If the first argument is a string, the object with the specified name is regarded as a list object. |
Usage: | x = comp(obj, com) | |
Input: | ||
obj | list object or string | |
com | string, the name of the component | |
Output: | ||
x | scalar |
proc () = plot (z, d) if (comp (z, "x") && comp (z, "y")) // check for existence show (d, 1, 1, z.x~z.y) endif endp d = createdisplay (1,1) x = (1:100)/100 y = x^2 a = list (x, y) plot (a, d)
a window with a plot of x^2
Group: | Information and Control |
See also: | list size |