Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Forth

Name: Anonymous 2011-06-11 14:02

Problem: Implement the word WITHIN? ( n low high -- t|f ), which returns TRUE if n is greater than or equal to low and less than or equal to high.

Solution:
: within? ( n1 n2 n3 -- t|f)
  rot dup rot <= -rot < and ;


Conclusion: My brain is full of fuck.jpg.

Name: Anonymous 2011-06-11 14:25

Oh great, another academic who went to the college with hope of ``writing'' ``games'' in ``C++'' and for whom it is inconceivable that there are different languages out there. I mean, the great game developer hasn't heard of them so they shouldn't exist.

Fact: This is the first time I'm reading Forth code. One Google for ``forth rot'' and 30 seconds later, this makes perfect sense to me.

All in all, go read your SICP.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List