Val 9 Returns The Result example essay topic

1,018 words
Catalog of DIESEL String Functions Status retrieval, computation, and display are performed by DIESEL functions. The available functions are described in the table. Note: All functions have a limit of 10 parameters, including the function name itself. If this limit is exceeded, you get a DIESEL error message. + (addition) Returns the sum of the numbers val 1, val 2, ... , val 9. $ (+, val 1 [, val 2, ... , val 9]) If the current thickness is set to 5, the following DIESEL string returns 15. $ (+, $ (get var, thickness), 10) - (subtraction) Returns the result of subtracting the numbers val 2 through val 9 from val 1. $ (-, val 1 [, val 2, ... , val 9]) (multiplication) Returns the result of multiplying the numbers val 1, val 2, ... , val 9. $ ( , val 1 [, val 2, ... , val 9]) / (division) Returns the result of dividing the number val 1 by val 2, ... , val 9. $ (/, val 1 [, val 2, ... , val 9]) = (equal to) If the numbers val 1 and val 2 are equal, the string returns 1; otherwise, it returns 0. $ ( = , val 1, val 2) (less than) If the number val 1 is less than val 2, the string returns 1; otherwise, it returns 0. $ (, val 1, val 2)! = (not equal to) If the numbers val 1 and val 2 are not equal, the string returns 1; otherwise, it returns 0. $ (! = , val 1, val 2) = , val 1, val 2) and Returns the bit wise logical AND of the integers val 1 through val 9. $ (and, val 1 [, val 2, ... , val 9]) Returns the angular value in the format and precision specified. $ (, value [, mode, precision]) Edits the given value as an angle in the format specified by the mode and precision.

(For mode values, see Example: Angular Units Values.) If mode and precision are omitted, it uses the current values chosen by UNITS. edtimeReturns a formatted date and time based on a given picture. $ (ed time, time, picture) Edits the AutoCAD LT Julian date given by time (obtained, for example, from $ (get var, date) according to the given picture). The picture consists of format phrases replaced by specific representations of the date and time. Characters not interpretable as format phrases are copied literally into the result of $ (ed time). See Example: Ed time Format Phrases. eq If the strings val 1 and val 2 are identical, the string returns 1; otherwise, it returns 0. $ (eq, val 1, val 2) The following expression gets the name of the current layer; if the name matches the string value stored in the USERR 1 system variable, it returns 1. Assume the string 'PART 12' is stored in USERR 1 and the current layer is the same. $ (eq, $ (get var, us err 1), $ (get var, c layer) ) eval Passes the string str to the DIESEL evaluator and returns the result of evaluating it. $ (evil, str) fix Truncates the real number value to an integer by discarding any fractional part. $ (fix, value) getenv Returns the value of the environment variable varna me. $ (, varna me) If no variable with that name is defined, it returns the null string. getvarReturns the value of the system variable with the given varna me. $ (get var, varna me) if Conditionally evaluates expressions. $ (if, exp r, do true [, do false]) If exp r is nonzero, it evaluates and returns do true. Otherwise, it evaluates and returns do false.

Note that the branch not chosen by exp r is not evaluated. index Returns the specified member of a comma-delimited string. $ (index, which, string) Assumes that the string argument contains one or more values delimited by the macro argument separator character, the comma. The which argument selects one of these values to be extracted, with the first item numbered 0. This function is most frequently used to extract X, Y, or Z coordinates from point coordinates returned by $ (get var). linelenReturns the length, in characters, of the longest status line that the display can present to the user. $ (line len) You can use this to vary the format of the status line, depending on the display capacity. This is useful for MODE MACRO status-line configuration only. nth Evaluates and returns the argument selected by which. $ (nth, which, arg 0 [, arg 1, ... , arg 7]) If which is 0, nth returns arg 0, and so on. Note the difference between $ (nth) and $ (index); $ (nth) returns one of a series of arguments to the function, while $ (index) extracts a value from a comma-delimited string passed as a single argument.

Arguments not selected by which are not evaluated. or Returns the bit wise logical OR of the integers val 1 through val 9. $ (or, val 1 [, val 2, ... , val 9]) rtos Returns the real value in the format and precision specified. $ (ros, value [, mode, precision]) Edits the given value as a real number in the format specified by mode and precision. If mode and precision are omitted, it uses the current values selected with the UNITS command. strlen Returns the length of string in characters. $ (stolen, string) substr Returns the sub string of string, starting at character start and extending for length characters. $ (sub str, string, start [, length]) Characters in the string are numbered from 1. If length is omitted, it returns the entire remaining length of the string. upper Returns the string converted to uppercase according to the rules of the current locale. $ (upper, string) xor Returns the bit wise logical XOR of the integers val 1 through val 9. $ (xor, val 1 [, val 2, ... , val 9]).