Hello.
I trully hope that the material of this article can be usefull even for those who have a long easyuo programming practice, because most of this 'features' are undocumented and were found by chance

General statement:
The scripts IMHO can be put into two groups:
a) educational (classic) and which will be supported\watched\inspected by someone else and
b) 'wild' ones - where perfomance is the main target.
So i'll try to show you that 'wild' way

wich in my case doesn't brake the main programming rules but uses some rarely used possibilities, some 'wild' tricks and compressed style - 'code in code'.
Part 1. Brackets and boolean multiplying.Every bracket line in easyuo is considered to be a separate line and processed as a separate line.
So the #lpc cicle is reduced by the amount of bracket lines. If #lpc is 10 and we have 10 lines in a script, where 2 are brackets, the total script performance will go down 20% (theoretically), because only 8 lines are actually 'usefull' in a script and the delay after processing 10 lines (#lpc 10) will happen anyway.
Test example:
set #lpc 10 ;default
;set #lpc 200
set %iter 100
set %t1 #SYSTIME
for %i 1 %iter
{
if %i < 50
{
set %return1 bla-bla
}
else
{
set %return1 bla-bla2
}
}
set %t1 #SYSTIME - %t1
set %t2 #SYSTIME
for %i 1 %iter
{
if %i < 500
set %return2 bla-bla
else
set %return2 bla-bla2
}
set %t2 #SYSTIME - %t2
halt
For my PC the results are following:
#lpc 10 : %t1=3547 - %t2=2594ms
#lpc 200: %t1= 215 - %t2= 157ms
That speed test is not 100% accurate, because we have "for %i 1 %iter {}" in both cases which consumes the same amount ot lines.
So the brackets may not be used in following structures if you want to encrease the perfomance of your script:
for %i 1 100
One line only, for more lines you will need brackets
while bCondition
One line only, for more lines you will need brackets
repeat ; brackets may not be used
code block1
code block2
code block3
code block4
until
if bCondition
one line of code
if bCondition
one line of code
else
one line of code
if bCondition 3 ; 3- you set how many lines to pass if bCondition=#false
line 1
line 2
line 3
else 2 ; same here: you set how many lines should the script pass after
line 1 ; execution of the 'true block' (bCondition=#true)
line 2
if bCondition N ; N lines of code
line 1
line 2
...
line N
So you can make such construction without brackets:
if a>b 5 ; <- 5 here is the next 5 lines
if a>c ; 1
line 1 ; 2
else 2 ; 3
line 1 ; 4
line 2 ; 5
else 7 ; <- 7 here is the next 7 lines
if a>c 2 ; 1
line 1 ; 2
line 2 ; 3
else 3 ; 4 <-else 3 - 3 here is the next 3 lines
line 1 ; 5
line 2 ; 6
line 3 ; 7
In this example we have cutted 12 brackets and got fast, but hardly readable and updateble code.
The main problem is when you\someone start editing watch the line shift indexes after if\else.
I personally do not recommend to 'pack' code cutting brackets before it's completely done.
Can the line shift index after IF be negative? yeshave a look on example:
Example 2:
set %timeout #SYSTIME + 5000 ; set timout current time + 5 secs
if %timeout < #SYSTIME -1 ; wait until timout
Warning! "#SYSTIME -1" in the last line not "#SYSTIME - 1", "-1" - is a line shift index.
I other words it checks the condition if %timout already less than current time? if yes, then it will go to th next line after 'if' statement if
not, then it will take the current shift index and go according it.
Example 3:
gosub Send_party_chat Help_i'm_dead: , #CHARPOSX , _ , #CHARPOSY , _ , #CURSKIND ;<----+
gosub Check_Is_Someone_Going_to_resurect_me ; |
wait 20 ; |
if #CHARGHOST = no -4 ;>----+
gosub Send_party_chat I'm_Alive!Ehha!
This code rotate until you'll be resurected
Example 4: (you'll find it in my Subs):
if #false ( %0 * -2 * ( %0 < 9 && _ , %1 , _ in _SubName1_SubName2_SubNameN_ ) )
set #result Error_No_such_sub
exit
gosub %1
exit
gosub %1 %2
exit
gosub %1 %2 %3
exit
gosub %1 %2 %3 %4
exit
gosub %1 %2 %3 %4 %5
exit
gosub %1 %2 %3 %4 %5 %6
exit
gosub %1 %2 %3 %4 %5 %6 %7
exit
gosub %1 %2 %3 %4 %5 %6 %7 %8
exit
Looks wild?

but it works perfect and very fast. The purpose is to redirect incoming request to the appropriate sub in the subs library (all small subs are in a one file)
call Library.euox %SubName %parametr1 %parametr2 ... %parametrN
Any Sub can receive up to 7 parameters in this example.
Here comes another 'wild' aspect that works in easyuo - multiplying boleans and integers

#true is -1 and #false is 0.
Lets have a look on the first line in details.
if #false ( %0 * -2 * ( %0 < 9 && _ , %1 , _ in _SubName1_SubName2_SubNameN_ ) )
a) e) d) +- b) --+ +--------- c) ---------------------------+
a) always #false - means to force script use line shift index every time
b) and c) error check bracket:
b) if #true - 1-7 parameters passed c) do we have such Sub in our file? - if b) or c) fails we will get #false (what means 0)
otherwise we'll get #true (what means -1).
d) we multiply -2 (number of lines in each sub call) on #true(-1) or #false(0) and get +2 or 0(if error check fails)
e) we calculate the line shift: number of parameters passed * 2 or 0
if d) gives us 0, the next line in statement if #false 0 will be set #result Error_No_such_sub, like there is no 'true' block at all
if d) gives us 2, we have an offset to the gosub with a proper number of parameters to be passed to the final Sub.
More multiplying:set %a #true
set %d 0
if %a ; %a can be #true or #false - some condition
set %d %d - 1
esle
set %d %d + 1
same, but in one line:
set %d 1 + %d + %a * 2
Can line shift indexes after ELSE be negative? yesExample 5:
set %a 4
set %b 1
if %a > %b
set %b %b + 1
else -3
This script will go further only when %b = 4.
Probably that's all for today post. Next part may be about strings in every day life

Please let me know if you like this post or not.
May be i'm just trying to tell you something evident and well known?

Thanks for reading. And sorry for my
EnGliSh 