Category:Gri

From Rosetta Code
Language
Gri
This programming language may be used to instruct a computer to perform a task.
Official website
Parameter passing methods: By reference, By value
Type safety: Safe
Type expression: Implicit
Type checking: Dynamic
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Gri.

Gri is a scripting language for drawing scientific graphs with output to PostScript.

Data points to plot can be read from a file or can be generated by an external program such as Awk. Data manipulation within Gri is limited, it being designed to be done by external crunching.

Drawing commands are provided to add various kinds of symbols, textual annotations, trend lines, etc. Those commands can be used for general purpose drawing too, with no graph data at all.

New commands are defined with a kind of keyword matching

<lang Gri>`My Command .arg1. to .arg2.' Docstring describing this command. {

 # code here

}

  1. call as

My Command 123 to 456</lang>

New commands can loop and call each other, including recursively. Commands can set global or local variables and can use "synonyms" to act on named variables.

Arithmetic is done in reverse-polish such as

<lang Gri>{rpn 123 456 +}</lang>

New rpn functions can be defined. They're a simple substitution with no looping, conditionals or recursion.

Pages in category "Gri"

The following 6 pages are in this category, out of 6 total.