This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options_explained.txt
123 lines (87 loc) · 5.05 KB
/
options_explained.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
1-SET NO STATEMENT FUNCTION CALLING
------------------------------------------------------------------------------------------------------------------------
when you set no statement function calling is True(not recommended) when you want to write a function
you only write the name of it, and it will be replaced with its value that means
any word in your code that is exactly the same function name it will be replaced the big problem is
because it will be replaced any word in your code that is exactly the same function that means
accidentally it will be replaced words in your code that you do want to be replaced like this example:
print("this called a cube not block")
now this is now python code, but if in func_mapping we have the word block as function name(func_mapping key):
func_mapping = {
...
'block':'class',
...
'~1':''}
note:don't worry about '~1' I will explain it later
it will be replaced with its value that means when the compiler starts finding functions names operation
and find there is function called block, it will be replaced block with its value that is class
our code, it will be like this:
print("this called a cube not class")
because we will get an unexpected result when we run the code, this is:
this is called a cube not class
this is an unexpected result because we think the result it will be like this:
this is called a cube not block
there is way to avoid this problem while we're using no statement function calling
note:it's not a practical way, but it's the only way
that is at every word that is exactly the same function name inside it, we will put '~1' mark
that if you notice this mark always you will find it in the last line of the func_mapping,
and you must never delete it or change it or change the place of it because this mark value is '' (nothing)
and if you know this compiler uses FTCVRB system or FTCVRBS(from to compiler vertical read based system)
this is reading vertically that means it will be read at first the first line after it the second line and so on
and because the compiler FTCVRBS when it will read the func_mapping it will read line by line and because the '~1' mark
is the last function at the func_mapping it will be the last thing it will be read by the compiler and this is the
important track because the compiler it will read our block function before '~1' mark snd because of that the compiler
will never find the block function in our code but why this is simple example to explain:
note:let '>' where the compiler reads the code
note:the compiler will never read anything at is outside the value of func_mapping variable
note:the compiler will every function that it reads it at the
moment(only in the line that read it now not the lines that are before this or after it)and try to find it in our code
now this is our func_mapping
func_mapping = {
...
'block':'class',
...
'~1':''}
now the compiler will read it like this:
> ...
after complete read that it will read
> 'block':'class',
after it
> ...
and finally it will read
> '~1':''
now this is our code with '~1' mark:
print("this called a cube not blo~1ck")
when the compiler try to find the function that it reads it now inside our code
and finally reads the block function key and value and try to find the function key inside or code
it will never find block word because there is no block word in our code because our code has blo~1ck word not block
word because of that it will read the next function and our code will stay the same, now after all of that
when the compiler finally reads the last function that is '~1' mark it will find it in our code because it found in the
word blo~1ck because of that the compiler will replace the '~1' mark with its value that is ''(nothing) that means the
'~1' mark it will be deleted from our code and this is the end even if our code after ~1 being deleted and now there is
block word instead of blo~1ck but nothing will happen because when the turn of the block function happens and never
found a block word in our code this is the end of block function(nothing matters after the turn was over because even
if their is block word after the turn was over nothing will happen to our block word).
and because of that, when we run our code, the result will be like this:
this is called a cube not block
finally, we got the result that we want.
when you set no statement function, calling is False(recommended) when you want to call a function
you need to make function block, and this is a simple list that contains all the functions blocks in GLC with explaining
for all of them:
$<
code
/function>$
this is multi line function block that prints the value of the functions that are inside
this block
%<
code
/function>%
this is multi line function block that returns the value of the functions that are inside
this block
$<code/function>$
this is single line function block that prints the value of the functions that are inside
this block
%<code/function>$
this is single line function block that returns the value of the functions that are inside
this block
note:if you want, you can use '~1' but it is not really useful it works but not that useful