advanced hello world
[svn/Cll1h/.git] / ABOUT
CommitLineData
04a13a6f 1THIS FILE IS UNFINISHED !!!!
2
3
4a48705a 4This file is called ABOUT, because it is, well... README, INSTALL, HOWTO,
5FAWQ, RTFM and maybe even manual, all in one file. So why not calling it
6ABOUT.
7
8==============================================================================
9Your outside is in:
10==============================================================================
11
12Well, if you are outside cll1.h... first, forget about all previouse versions of
13cll1.h. First of all: the source code should look familiar and readable to
14anyone, who have seen anything written in any sane programming language (which
15means basicaly anything like Bash, Basic, C, Java, Javascript, Pascal, Perl,
16PHP and Python and perhaps lot more).
17
18Let's see what we have and what you can use:
19
201. This Is The Program - forget int main(...)!
21----------------------
22
23#include "cll1.h"
24
25program {...}
26
272. This Is The String Pointer - just use it.
28-----------------------------
29
30You don't have to declare "char *_;" - because we have done this for you
31automagicaly. In C<<1, this is generic temporary character pointer, which
32can be used to anything you need to do with strings.
33
343. This Is The Ouput Statement - no comment :-)
35------------------------------
36
37print(string1, string2, ...);
38
393. Dynamic lists - their declaration is complex, but their usage not.
40----------------
41
42struct ListType
43{
44 ...
45 list(ListType);
46} *listmemeber,*listhead=NULL;
47
48create(listmember,ListType);
49append(listmember,listhead);
50find(listmember,listhead,expression);
51remove(listmember,listhead,expression);
52sort(listmember,listhead,key,)
53
543. Iterations (cycles) without control variable - can be nested, of course
55-----------------------------------------------
56
57do {...} loop;
58repeat (const int howmanytimes) {...}
59
604. New cool iterators (iteration expresions) for good old FOR cycle
61-------------------------------------------------------------------
62
63for range (int controlvariable, const int from, const int to) {...}
64for each (ListType *controlvariable, ListType *listhead) {...}
65for chars (char controlvariable, const char *string) {...}
66for lines (char *controlvariable, char *filename) {...}
67for flines (char *controlvariable, FILE *filehandle) {...}
68
695. - 6. Undefined - reserved for future use
70-----------------
71
727. Toys - everybody likes toys
73-------
74
75spam (const int howmanytimes, const char *string);
76
778. Obsolete - but still backwards compatible with previous versions...
78-----------
79
80every (A,B) {...} -> for each(A,B) {...}
81search (A,B,C) {...} -> for each(A,B) if (C) {...}
82
839. Then Buddhism - you can use then, and, or, not and TRUE/FALSE constants.
84----------------
85
86if (expression) then {...} else {...}
87if (not expression or expression and expression) then {...} else {...}
88
89...if you wish, THEN you can. Forget about C, if you don't like it.
90
91if (expression) {...} else {...}
92if (! expression || expression && expression) {...} else {...}
93
94...if you don't wish, you don't have to. Go back to the C, if you want.
95
96==============================================================================
97Your inside is out:
98==============================================================================
99
100If you are inside l1.h... first, forget about all previouse versions of
101cll1.h. I have changed lot of things dramaticaly. First of all, I found out,
102that I really have to learn C basics first, before I can attempt to write
103set of C language macros. C<<1 until version cca 0.6 seemed like a good
104idea, until I have encoutered Python. Then I become enlightened: we don't
105need thousand different iterators (eg. every,search,find, and so on). We
106already have one very nice iterator, called for. We can just stick with this
107meta-iterator like Python does, and we can have just different iteration macros
108for different data types and structers... so this is the way
This page took 0.156935 seconds and 4 git commands to generate.