A frag (a formal-rag), is a calculator formula, that may refer values throughout a formal net. Any modifier (transition) may list a few (frag functions). The big picture is the valuable. A single frag is not telling a lot.
frag is for zooming into a formal-net, for rezolving/modifying, or for reporting-from. Rezolving is compulsory for keeping the net deterministic. Rezolving is for choosing that you want, when facing a few. (Vocabularies spell rezolving as "resolving," but that is not about "solving again.")
A frag is terminating with the first finishable row. That is, if there is no failing on that row, until the '.' (full stop).
b1 ? b2==b3 ? 1. 0.
b1 ? b2==b3 ? 1. 0
is, if b1 is non-zero, and if the values of b2 and b3 are equal, then returning 1, because that first row is finishable. Otherwise, returning 0. (No need to put a full-stop after the last row. Does not hurt, either.)
A fail-testing is short-circuiting. That is, if b1 is zero, does not even look into b2==b3. Failing.
A row may occupy a row, visually too. Not compulsory, though. Free to list without wrapping.
All the row-list of a frag is together, and testing all, until a row finishes, or all have failed.
b1! ? b2==b3 ? 1. 0
is different, in testing for a zero-value. The exclamation-mark is for converting a zero-value to 1, and non-zero values to zero. Thus, if b1 was non-zero, now after that '!', the '?' will find a zero, and will fail the row.
- 5 * 3 + 23 / 4 =@ M4 * 3 =@ M5
- 5 * 3 + 23 / 4 =@ x4 * 3 =@ x5
is for storing 2 at the memory location M4, and 6 at M5.
Referring to data in memory as M# is the VD78-friendly notation -- familiar for a calculator-user, too. For NN73-friendship, the x# is standing for "xi" the Greek letter -- as well as the x from math.
The '=' is next to the value, while the '@' is next to the target address. The operator := is equivalent to @= (as =: is equivalent to =@), but relatively few people may know that the ':' means "to." Most people know that '@' is telling of addressability, as with internet-mail at addresses. Therefore, I prefer the notation =@ mostly.
M4 *= 5
5 =* M4
is for mutiplying M4 with 5 -- getting the first value from, and storing the result at, M4.
frag is working as a calculator. Therefore, computing (& assigning) from left to right, not the vice versa -- unless using a herd of subblocks, to revert that, as with
M4 @= ((-(5 * 3) + 23) / 4)
There is no "sign" operator.
For randomizing, as for example, in case-testing,
rndm % 4 >= 2 ? 3. @rndm
rndm & 3 >= 2 ? 3. @rndm
rndm % 4 == 0 ? 0. @rndm % 4 == 1 ? 1. @rndm % 4 >= 2 ? 2.
is for running the randomizing function one time, for testing all those cases. If rndm were invoked again and again, new values would be generated, corrupting the test, in this case. Therefore, looking into @rndm.
@rndm is the memory-location associated with rndm, keeping the last value that rndm has made.
The '%' is the modulo-arithmetic operator. For a coin-tossing eperiment, taking the modulo 2, would tell 0 or 1, with half-chances. For a dice-throwing experiment, taking modulo 6, would tell 0, 1, 2, 3, 4, 5, with one-sixth chance, for any. Actually, without any modulo operator, that random value is from zero to upto a billion. That is, for a coin-tossing, you could test whether that is more than 500000000, if not using modulo arithmetic.