Просмотр сообщений

В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.


Сообщения - maliya

Страницы: [1]
1
More trouble than benefit! keep language and compiler as simple as possible,though any problem can be solved by reference to other language's compiler,I think there is no need to continue to do: we are not good
at function programming just now, isn't it?

2
Цитировать
Still IT traps on My BB 1.6-rc6 ...

it needs to make some changes of compiler, I say  it's half work,only a draft.
if it needed, can continue change compiler to let original example compiled and work without any change.
It is only a local procedure be packed as a normal procedure, not a true closure.

for my little knownledge of closure reason,I dont known what syntax should be add to cp if we want it.

closure reference, example and suggestion is welcome!

3
hi,I have done some work to make bb can work with this example.

so far, I don't think the closure is useful in bb programing, just do a half work only.

does we need this feature to built  in compiler?

 



   

4
Общий раздел / Re: [BlackBox] Compiler trap.
« : Май 18, 2013, 04:15:28 pm »

Can you explain this fix? It is safe?
[/quote]

it only change the regsiter select order;I think it is safe.




5
Общий раздел / Re: [BlackBox] Compiler trap.
« : Май 18, 2013, 01:49:06 pm »
DevCPC486.GetReg
                        ....
                        IF 0 IN s THEN n := 0
ELSIF 2 IN s THEN n := 2
ELSIF 6 IN s THEN n := 6
ELSIF 7 IN s THEN n := 7
ELSIF 1 IN s THEN n := 1
ELSE n := 3
END;
                        ....


change to

                        ....
                        IF 0 IN s THEN n := 0
ELSIF 2 IN s THEN n := 2
ELSIF 1 IN s THEN n := 1
ELSIF 3 IN s THEN n := 3
                        ELSIF 6 IN s THEN n := 6
ELSE n := 7
END;
                        ....


6
valexey,

HostMenus    add:
   
       ......
        VAR newPeroid:INTEGER;

        .....
PROCEDURE SetPeriod*(period:INTEGER);
VAR res:INTEGER;
BEGIN
res := WinApi.SetTimer(HostWindows.main, 1, period ,  NIL);
newPeroid :=period;
END SetPeriod;

PROCEDURE PeroidGuard* (period: INTEGER; VAR par: Dialog.Par);
BEGIN
IF newPeroid = period THEN par.checked:=TRUE
ELSE par.checked:=FALSE;
END;
END PeroidGuard;

        PROCEDURE Init;
       .......
             newPeroid :=idlePeriod;
        END Init;
compile it.

add a Test\Rsrc\menus.odc
MENU "TimerPeriod"
"10" "" "HostMenus.SetPeriod(10)" "HostMenus.PeroidGuard(10)"
        "20" "" "HostMenus.SetPeriod(20)" "HostMenus.PeroidGuard(20)"
"30" "" "HostMenus.SetPeriod(30)" "HostMenus.PeroidGuard(30)"
"40" "" "HostMenus.SetPeriod(40)" "HostMenus.PeroidGuard(40)"
"50" "" "HostMenus.SetPeriod(50)" "HostMenus.PeroidGuard(50)"
END


and select a peroid from menu, test you code !

PS: no need change other code, I have a panic for the caret flip ):

7
you can send me a demo source, I can change myBB modules and test, and give a result to you

8
the BB has  only a time1 which control caret flip, window update,actions.step ...etc,if you set a short period for it, the whole framework will update quickly...,that is not you wanted, so  handling actions.step alone would be suitable.  but I dont known your actual work's target , so it is only a suggestion.

9
>Or We can Add to HostMenus New function for setting New Idle period.
for what reason? if you need a quick action, you'd better set a new timer2 with short period(<50),and
handle it in HostMenus.ApplWinHandler, and move Services.actionHook.Step; form HostWindows.Idle to it.



10
HostMenus.idlePeriod  =50 (*ms*),you can change it,compile.. test again ):

11
the "Action" topic has been discussed on oberoncore for a  long time,you'd better make a search in it!

12
Общий раздел / Re: [Oberon-07/11] Беззнаковое целое.
« : Декабрь 16, 2012, 08:46:33 am »
in CP, for unsigned int(8,16), just use MOD operator:
uint8 := x MOD 256;
uint16 := x MOD 65536;


Страницы: [1]