The for Function The index in a for expression is saved before the for loop and is restored to its saved value after the for loop is exited. SKILL does most of its error checking during execution. Error messages involving for expressions can be obscure. Be sure ...
The if Function Use the if function to selectively evaluate two groups of one or more expressions. 使用if函数来有选择地评估一个或多个表达式的两个组。 The condition in an if expression evaluates to nil or non- nil . if表达式中的条件将被评估为nil或非nil。 ...
Logical Operators SKILL considers nil as FALSE and any other value as TRUE. The and () and or (||) operators only evaluate their second argument if they need to determine the return result. SKILL将nil视为假(FALSE),而将其他任何值视为真(TRUE)。而逻辑与()和逻辑或( ...
Reading Data from a File To read a text file 1. Use the infile function to obtain an input port. 2. Use the gets function to read the file a line at a time and/or use the fscanf function to convert text fields upon input. 使用gets函数逐行读取文件,和/ ...
Writing Data to a File To write text data to a file 1. Use the outfile function to obtain an output port on a file. 2. Use an optional output port parameter to the print and println functions and/or use a required port parameter to the fprintf function. 3. C ...
File Input/Output This section introduces how to ■ Display values using default formats and application-specific formats ■ Write UNIX text files ■ Read UNIX text files application-specific format应用程序特定格式 Displaying Data Display data using ...
Modifying Lists The following functions operate on variables without changing their value or creating new variables. 以下函数在操作变量时不会改变它们的值或创建新的变量。 Coordinates An xy coordinate is represented by a two-element list. The colon (:) binary operator builds a coordinat ...