I’m curious what is happening in e.g. left of the “=”:
val 0 = linset_insert_ngc (xs, nx)
val-(9) = mynode_getfree_elt (nx2)
I’m curious what is happening in e.g. left of the “=”:
val 0 = linset_insert_ngc (xs, nx)
val-(9) = mynode_getfree_elt (nx2)
0 is just a variable name.
'val-(9) is the same as val- 9;
so ‘val-(9) = …’ expects the right-hand side to return 9;
if not, a run-time matching failure aborts the execution.On Sunday, January 12, 2014 8:52:32 PM UTC-5, Brandon Barker wrote:
I’m curious what is happening in e.g. left of the “=”:
val 0 = linset_insert_ngc (xs, nx)
val-(9) = mynode_getfree_elt (nx2)
For instance:
val-(9) = 3 * 3 // okay
val-(9) = 3 + 7 // run-time failure
Give it a try and you will see what happens.On Sunday, January 12, 2014 8:58:45 PM UTC-5, gmhwxi wrote:
0 is just a variable name.
'val-(9) is the same as val- 9;
so ‘val-(9) = …’ expects the right-hand side to return 9;
if not, a run-time matching failure aborts the execution.On Sunday, January 12, 2014 8:52:32 PM UTC-5, Brandon Barker wrote:
I’m curious what is happening in e.g. left of the “=”:
val 0 = linset_insert_ngc (xs, nx)
val-(9) = mynode_getfree_elt (nx2)
This seems to be a convenient notation for assertloc, except that in
addition to what assertloc will do, it also prints this message:
exit(ATS): unmatched value at run-time:On Sunday, January 12, 2014 9:01:20 PM UTC-5, gmhwxi wrote:
For instance:
val-(9) = 3 * 3 // okay
val-(9) = 3 + 7 // run-time failureGive it a try and you will see what happens.
On Sunday, January 12, 2014 8:58:45 PM UTC-5, gmhwxi wrote:
0 is just a variable name.
'val-(9) is the same as val- 9;
so ‘val-(9) = …’ expects the right-hand side to return 9;
if not, a run-time matching failure aborts the execution.On Sunday, January 12, 2014 8:52:32 PM UTC-5, Brandon Barker wrote:
I’m curious what is happening in e.g. left of the “=”:
val 0 = linset_insert_ngc (xs, nx)
val-(9) = mynode_getfree_elt (nx2)