1 <!doctype html public "-//IETF//DTD HTML//EN">
\r
6 <TITLE>Formal types</TITLE>
\r
8 <META NAME="GENERATOR" CONTENT="Internet Assistant for Word 1.0Z">
\r
9 <META NAME="AUTHOR" CONTENT="NOM">
\r
15 <U><I>Loglan 82, A micro-manual of the programming language -
\r
16 Basic constructs and facilities</I></U>
\r
17 <H1><IMG ALIGN=MIDDLE SRC="gifs/logo2.gif"> 9) Formal types</H1>
\r
21 Formal types serve for unit parametrization with respect to any
\r
26 <IMG SRC="gifs/ft01.gif">
\r
28 Procedure Gsort (the generalization of procedure sort from p.4)
\r
29 has type parameter T. A corresponding actual parameter may be
\r
30 an arbitrary non-primitive type. An actual parameter corresponding
\r
31 to A should be an array of elements of the actual type T. Function
\r
32 less should define the linear ordering on the domain T.
\r
34 For instance, the array A of type bill (cf p.7) may be sorted
\r
35 with respect to attribute dollars , if the function:
\r
37 <IMG SRC="gifs/ft02.gif">
\r
39 is used as an actual parameter:
\r
41 <IMG SRC="gifs/ft03.gif">
\r
43 If the user desires to sort A with respect to date, it is sufficient
\r
46 <IMG SRC="gifs/ft04.gif">
\r
48 and to call: <B>call</B> Gsort(bill,A,earlier); <HR>
\r
51 <A HREF="Prefixin.htm"><IMG SRC="gifs/PrevPage.gif"></A>
\r
52 <A HREF="homepage.htm"><IMG SRC="gifs/HomePage.gif"></A>
\r
53 <A HREF="Protecti.htm"><IMG SRC="gifs/NextPage.gif"></A> <HR>
\r
56 Last update 02/07/95
\r
60 Comments, suggestions and critiques are welcome to : <A HREF="mailto:linfo062@crisv2.univ-pau.fr">linfo062@crisv2.univ-pau.fr</A>
\r