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