Message Boards Message Boards

0
|
1211 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Using parts of compound expressions

Posted 10 years ago
Is there a simple construct similar to % that allows one to access the 'output' of earlier parts of a compound expression, for use in later parts of the same compound expression? For example, if such a construct had 'symbol' X, say, then perhaps inputting 1+2;X+10 would output 13? Similarly, perhaps inputting 1;2;3;X+XX would output 5? I'm aware that you can set up dummy variables and modules etc to effect similar outcomes, but does anything simple like I've described exist? Many thanks to whoever answers this or provides a lead.
POSTED BY: Murray Paul
The short answer is no. 
To make sure I've understood your request, is there a feature like this in another programming language that you know of that I could compare against? 

The semicolon operator suppresses the output of an expression. So I'm not even sure how you would access the value. I guess you could write something to make compound expressions other than semicolon, but I think thats a bad idea all around.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract