- This wiki is out of date, use the continuation of this wiki instead
 
Datatypes
From FenixWiki
(Difference between revisions)
												
			
			| Revision as of 18:48, 29 April 2007 (edit) Sandman (Talk | contribs) ← Previous diff  | 
				Current revision (15:08, 1 August 2007) (edit) (undo) Sandman (Talk | contribs)  | 
			||
| (3 intermediate revisions not shown.) | |||
| Line 1: | Line 1: | ||
| - | + | [[Category:general]] | |
| + | |||
| + | == Definition == | ||
| + | Datatypes are the types which data can be. These include integers, floats, string, etc. Special cases are voids, arrays, varspaces and structs. User made types can also be defined, by use of the operator [[Type]]. | ||
| + | |||
| + | == List == | ||
| + | <DPL> | ||
| + | category = datatypes | ||
| + | mode = userformat | ||
| + | columns = 1 | ||
| + | listseparators = ,\n* [[%PAGE%|%TITLE%]],, | ||
| + | redirects = include | ||
| + | ordermethod = titlewithoutnamespace | ||
| + | resultsfooter = \n%PAGES% datatypes | ||
| + | </DPL> | ||
| + | |||
| + | == Example == | ||
| + | <pre> | ||
| + | |||
| + | Program datatypes; | ||
| + | |||
| + | Type _point | ||
| + | int x; | ||
| + | int y; | ||
| + | End | ||
| + | |||
| + | Private | ||
| + | _point A,B; | ||
| + | Begin | ||
| + | |||
| + | A.x = 100; | ||
| + | A.y = 50; | ||
| + | B.x = 250; | ||
| + | B.y = 150; | ||
| + | |||
| + | drawing_map(0,0); | ||
| + | drawing_color(rgb(0,255,255)); | ||
| + | drw_box(A,B); | ||
| + | |||
| + | Loop frame; End | ||
| + | |||
| + | End | ||
| + | |||
| + | Function int drw_box(_point A, _point B) | ||
| + | Begin | ||
| + | return draw_box(A.x,A.y,B.x,B.y); | ||
| + | End | ||
| + | </pre> | ||
| + | Used in example: [[drawing_map]](), [[drawing_color]](0, [[rgb]](), [[draw_box]]() | ||
Current revision
[edit] Definition
Datatypes are the types which data can be. These include integers, floats, string, etc. Special cases are voids, arrays, varspaces and structs. User made types can also be defined, by use of the operator Type.
[edit] List
11 datatypes
[edit] Example
Program datatypes;
    Type _point
        int x;
        int y;
    End
Private
    _point A,B;
Begin
    A.x = 100;
    A.y = 50;
    B.x = 250;
    B.y = 150;
    drawing_map(0,0);
    drawing_color(rgb(0,255,255));
    drw_box(A,B);
    Loop frame; End
End
Function int drw_box(_point A, _point B)
Begin
    return draw_box(A.x,A.y,B.x,B.y);
End
Used in example: drawing_map(), drawing_color(0, rgb(), draw_box()
