structures

Marty Billingsley marty at vertex.ucls.uchicago.edu
Mon Mar 8 12:29:40 EST 2004


Is there a way to create structures in Transcript?
I want to represent an entity that has several attributes
(actually, I want to represent an array of such entities).
So, is there something similar to the "struct" that exists
in programming languages like c++ and scheme?

For example, one of my students wants to create an array
of bullets for his video game.  For each bullet we need to
know the following:
 - its current availability (already in use, or available)
 - its movement in the x direction if in use
 - its movement in the y direction if in use

We could use three parallel arrays, but it seems cleaner to
use a struct.  Is it possible?

Thanks,
  - marty

--
Marty Billingsley (marty at ucls.uchicago.edu)
The University of Chicago Laboratory Schools

    "We are our choices...."
                   - Sartre


More information about the use-livecode mailing list