parse()

Parses a string into tokens, where each token is delimited by a blank, tab, or operator. The following interpretations are made:

See also: list().

Syntax:

parse(text[, delim][, ops][, str]));

where

text is the string of text to be parsed.

delim is optional. String of delimiter characters. Recognizes normal arithmetic operators unless alternate characters are given in delimiter or special character strings. Default delimiters are space and tab.

ops is optional. String of special operator characters, each to be interpreted as an individual token. Default special operators are:
+ - * / = , ~ & ˆ < > ! # % ' () : ; ? @ [] \ ` {} �

str is optional. Specifies to only return strings, where:

  • FALSE = (default) each element is appropriately converted to int, real, or strings
  • TRUE = returns a list of strings, no conversion takes place

Example:

The example returns a list containing "hello", 1, 7.8, "*", and 32.6.

decl mylist;
mylist = parse("hello 1 7.8 * 32.6");

ALSO

parse("123.456", ".", NULL); // returns list(123,456)
parse("123.456", ".", NULL, TRUE); // returns list("123","456")

Download Example File:

The following link(s) lead to the Agilent EEsof EDA Knowledge center website. You will need to register at this site with a valid support contract to download an example file.

Get File Permissions
Get File Size
Get File Time Stamp

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources