Home

News

International

Screen Shots

Documentation

Download

Build

License

Credits

Contact

SourceForge Project

Tintware Documentation : Tint Programming Language : Tint Tutorial : A Complete Program

A Complete Program

Here is a complete program which can be run using tintc. The program will be a simple command line interpreter for Tint.

Def:Proc:read-eval-print(%port)
[*]
#(%port.put,=] )
#(%port.put,#(tint.code,#(%port.match,#(tint.byte,10)))(
))
#(read-eval-print,%port)
[*]

Def:Eval:
[*]
#(read-eval-print,#(tint.console))
[*]

To run the program, copy the code to a file, say acp.tnt and call tintc with that filename as the only argument, eg. tintc acp.tnt.