WS _ _ _ _ _ _ _ _ _ _ _ _ operator
The ws operator alone returns the last result; ws with a number argument returns the results of the REDUCE statement executed after that numbered prompt.
wsor ws(<number>)
<number> must be an integer between 1 and the current REDUCE prompt number .
(In the following examples, unlike most others, the nu mbered prompt is shown.)
1: df(sin y,y); COS(Y) 2: ws^2; 2 COS(Y) 3: df(ws 1,y); -SIN(Y)
wsand ws(<number>) can be used anywher e the expression they stand for can be used. Calling a number for which no result was produced, such as a switch setting, will give an error message.
The current workspace always contains the results of the last REDUCE command that produced an expression, even if several input statements that do not produce expressions have intervened. For example, if you do a differentiation, producing a result expression, then change several switches, the operator ws; returns the results of the differentiation. The current workspace (ws) can also be used inside files, though the numbered workspace contains only the in command that input the file.
There are three history lists kept in your REDUCE session. The first stores raw input, suitable for the statement editor. The second stores parsed input, ready to execute and accessible by input. The third stores results, when they are produced by statements, which are accessible by the ws< n> operator. If your session is very long, storage space begins to fill up with these expressions, so it is a good idea to end the session once in a while, saving needed expressions to files with the saveas and out commands.
An error message is given if a reference number has not yet been used.