git @ Cat's Eye Technologies SixtyPical / goto-at-end-of-block eg / rudiments / new-style-routine.60p
goto-at-end-of-block

Tree @goto-at-end-of-block (Download .tar.gz)

new-style-routine.60p @goto-at-end-of-blockraw · history · blame

// SixtyPical 0.11 introduced a new syntax for defining routines
// (routine was made into a type, and you can now say: define name type.)

typedef routine
  inputs x
  outputs x
  trashes z, n
    routine_type

vector routine_type vec

define foo routine_type
{
  inc x
}

define main routine
  outputs vec
  trashes a, z, n
{
    copy foo, vec
}