Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Do you have to put a b and c in the stack before you call sum-three?

(+1)

Exactly! So the call would look like: 

A B C SUM-THREE

Or using literals like: 

1 2 3 SUM-THREE

Or maybe the first two arguments are already on the stack from a previous function call and you just want to sum them with 5:

5 SUM-THREE

It sounds so complicated. But that's probably because I'm unfamiliar with it

(+1)

The big benefit is that if you're starting from nothing, you can get a usable Forth development setup with a lot less time and effort than it would take to make a compiler for a language like C, and the development tools will use a lot less memory. Was really helpful in the 70s.

That's interesting! A whole world of programming I didn't know about