title: Is there a way to set two outer variable value in a test in openSCAD?
body: <p>As far as I understand, openSCAD trying to be a functional language makes it unable to set an outside variable value from inside a context. eg :</p>
  <pre><code>(p, q) = true ? (1, 2) : (3, 4);
  if (faces==4) {
    p=3; q=3;
  } else if (faces==6) {
    p=4; q=3;
  } else if (faces==8) {
    p=3; q=4;
  } else if (faces==12) {
    p=5; q=3;
  } else if (faces==20) {
    p=3; q=5;
  } else {
    message = str(&quot;platon solid cannot have &quot;, faces, &quot; faces (only 4, 6, 8, 12 and 20).&quot;);
    assert (false, message);
  }
  dihedral = 2*asin(cos(180/p)/sin(180/p)); // Won't work
  </code></pre>
  <p>In a language like python, the simple solution to such a problem would be to return a tuple. e.g.:</p>
  <pre><code>def platon(faces):
      if faces==4: return 3, 3
      if faces==6: return 4, 3
      if faces==8: return 3, 4
      if faces==12: return 5, 3
      if faces==20: return 3, 5
      raise ValueError(f&quot;platon solid cannot have {faces} faces (only 4, 6, 8, 12 and 20).&quot;
  
  p, q = platon(N)
  dihedral = 2*asin(cos(180/p)/sin(180/p))
  </code></pre>
  <p>But it looks like openSCAD is not able to return more that one variable at a time...
  Is there a way (other than a workaround) to solve such a problem ?</p>