Z.u.L. > Documentation > Context Help

Descriptive constructions in files

Descriptive constructions can be loaded from a file. Alternatively edit the description and then load the construction.

The syntax is line oriented and uses the commands described above. Line comments //... may be used. The files may contain macros in the following format.

macro U
// Constructs a circle through three points
parameter A=point // Select first point
parameter B=point // Select second Point
parameter C=point // Select third point
g1=MS(A,B)
g2=MS(A,C)
U=intersection(g1,g2)
target k=circle(U,A)
end

The indents are optional. Comments in the parameter lines are used as prompts, if the macro is used interactively. This macro calls the macro MS with two parameters.

macro MS
param A=point
param B=point
partial(true)
k1=circle(A,B)
k2=circle(B,A)
partial(false)
P1,P2=intersection(k1,k2)
target g=line(P1,P2)
end

If the command constructing the target constructs two objects, the target can be defined separately.

A,B=intersection(g,k)
target B

If a macro has more than one target, all targets must be assigned.

A,B=test(...)

Prompts are defined by the keyword prompt in front of an object name.

k=circle(A,5)
prompt k

Here is an example of a macro using a segment as a parameter.

macro MS
// Mittelsenkrechte
A=point
B=point
parameter s=segment(A,B)
...
end

If circles are used as a parameter, there is the special syntax

M=point
parameter circle(M)

This kind of circle can only be used in parameters.

The special command "showall" shows all intermediate objects. Otherwise, only targets will be visible. The command "invisible" superhides all objects that are no targets.

Related topics: Descriptive Constructions, Saving and loading files

Next topic: Assignments