Never used a mailing list before, got kinda pushed into using it since for some reason i cant talk in IRC.
I am trying to learn how to use factor, the whole stack oriented, concatenative programming is alien to me. I am trying to implement Herons Formula, to work out the area of a triangle: Area = sqrt(s(s-a)(s-b)(s-c)) s = a+b+c /2 I've sort of worked out how to do s: : dev2 ( d -- s ) 2 / ; : sem ( a b c -- s ) + + dev2 ; *Problem 1:* IDK why the following doesn't work. : sem ( a b c -- s ) dup + + dev2 ; *Problem 2:* say i get the above problem fixed(use dup before calling the word) * * I dont know how to proceed with the current stack: -bottom of the stack- a b c s -top of the stack- i've tried various words to modify the top of the stack but, can't seem to arrange it into a way so i can compute what i need. * *
------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk