Made to Order Software Corporation Logo

Add (typed)

SWF Action
Action Category: 
Action Details: 
Action Identifier: 
Action Structure: 
Action Length: 
0 byte(s)
Action Stack: 
pop 2 (a), push 1 (a)
Action Operation: 
a1 = pop();
a2 = pop();
if(is_int(a1) && is_int(a2)) {
  i1 := (int)a1;
  i2 := (int)a2;
  r := i1 + i2// sum
else if(is_numeric(a1) && is_numeric(a2)) {
  f1 := (float)a1;
  f2 := (float)a2;
  r := f1 + f2// sum
else {
  s1 := (string)a1;
  s2 := (string)a2;
  r := s1 + s2;   // concatenation
Action Flash Version: 

Pops two numbers or two strings, computes the sum or concatenation and push the result back on the stack.

This action is typed meaning that it will automatically convert the parameters as required and in a very well defined manner1.

  • 1. I need to verify and make sure that the synopsis I give here is indeed correct.


Post new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.