| |
|
|
| since XProfan-without-border is it possible a sheer infinity Prozedurrekursion to Abarbeitung To moving.
unfortunately meets not on Own functions To, separate only on Procedures.
Hierbei is the spelling definitive. CompileMarkSeparation crashes in example very quick ex against which CompileMarkSeparationinfinite (grenzenFrei How promised) worn out becomes.
I can present the Prf2CPP-User anyhow always a infinity procedure/Funktionsrekursion work out let can. @Sebastian: is the so?
Büdde improve Roland.
here another very anschauliches and simple Example for a Füll-function which The Rekursion uses as memory. CompileMarkSeparationCLS
USEPEN 0,0,0
RECTANGLE 1,1 - WIDTH(%HWND)-10,HEIGHT(%HWND)-10
LINE 10,10 - 200,20
LINE 200,20 - 50,300
LINE 50,300 - 100,50
LINE 100,50 - 10,10
ELLIPSE 300,200 - 500,400
F 120,100,GETPIXEL(120,100)
F 400,300,GETPIXEL(300,200)
PRINT bingo
WAITINPUT
proc F
PARAMETERS X&,Y&,TOFILL&
SETPIXEL X&,Y&,0
IF GETPIXEL(X&+1,Y&)=TOFILL&
F X&+1,Y&,TOFILL&
ENDIF
IF GETPIXEL(X&,Y&+1)=TOFILL&
F X&,Y&+1,TOFILL&
ENDIF
IF GETPIXEL(X&-1,Y&)=TOFILL&
F X&-1,Y&,TOFILL&
ENDIF
IF GETPIXEL(X&,Y&-1)=TOFILL&
F X&,Y&-1,TOFILL&
ENDIF
endproc
|
|
|
| |
|
|
|
Sebastian König | iF
I can present the Prf2CPP-User anyhow always a infinity procedure/Funktionsrekursion work out let can. @Sebastian: is the so?
No, unfortunately not - The Aufruftiefe is momentarily on 32 terminable. the has with the memory-management for Paramter-Stack To do...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 02/13/08 ▲ |
|
|
|
|
| i see - and it's a great pity.
to 32: allowing there Roland not a explicit höhere Recursion? |
|
|
| |
|
|
|
Sebastian König | |
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 02/13/08 ▲ |
|
|
|
|
| this Testcode gives a gewisse operator: (under The exe) CompileMarkSeparation//Version:0.0.3
{$cleq}
randomize
long i
cls
usepen 0,0,0
rectangle 1,1 - width(hwnd)-10,height(hwnd)-10
line 10,10 - 200,20
line 200,20 - 50,300
line 50,300 - 100,50
line 100,50 - 10,10
ellipse 300,200 - 500,400
f 400,300,getpixel(400,300)
f 120,100,getpixel(120,100)
f 400,300,getpixel(300,200)
print bingo
waitinput
end
f(long x,y,tofill){
i+
locate 1,20
print i
setpixel x,y,0
case getpixel(x+1,y)==tofill : f(x+1,y,tofill)
case getpixel(x,y+1)==tofill : f(x,y+1,tofill)
case getpixel(x-1,y)==tofill : f(x-1,y,tofill)
case getpixel(x,y-1)==tofill : f(x,y-1,tofill)
i-nt color=#0000FF>}
EDIT: code and EXE revised, it fehlte i- end the function f.
with the new code becomes me max 4.380 for i displayed. |
|
|
| |
|
|
|
Sebastian König | OK, The number can I confirm. objectively find I in the XProfan-Help indicated for maximum appeal-Verschachtelung, The 32 have I means well self chosen... shone me somehow one integrally guter Kompromiss between performance and memory-consumption To his. technical would it no too large trouble, The boundary abzuschaffen - I must only time look, whether and How very The speed under suffering would...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 02/13/08 ▲ |
|
|
|
|
Sebastian König | another Nachtrag...
at that viewing of my own Codes see I straight, that The allowing deep in the principle in Profan2Cpp still infinite is. ex the 33. plain behave itself the Stack with one appeal as function though then just as How with one appeal as commands. should hot: the go wrong Stack becomes then moreover using.... |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 02/13/08 ▲ |
|
|
|