| |
|
|
- Page 1 - |
|
Georg Teles | good evening,
now bastel I my Cryptsystem & under Anderem wished I one Source To something Ähnlichem here post and place solid, that with XPSE compiled programs in nativen Procedures with creep a worth always circa 7 larger give back as it his ought to...
here 2 Examples as Source:
with XProfan kompilierter Text, procedure gives right worth back (55619): CompileMarkSeparationDeclare dat#,dat&,res&
Declare wert$
Dim dat#,8
CLS 0
Word dat#,0 = 9812,3484,60000,22315
res& = cryrst_(dat#,8)
wert$ = Str$(res&)
print wert$
Waitinput
Proc cryrst_
Parameters ber#,ps&
Declare s&,res&
If ps& MOD 2 = 0
s& = (ps&\2)-1
Else
s& = (ps&\2)
EndIf
WhileLoop 0,s&
res& = res&+word(ber#,&loop*2)
If res& > 20000
res& = (res&-20000)
Endif
EndWhile
res& = (res&+ps&)
Return res&
ENDPROC
spot-on yourself code in XPSE, gives whom right worth the circa 7 larger is (means 55626): CompileMarkSeparation {$cleq}
Declare dat#,dat&,res&
Declare worth$
Dim dat#,8
CLS 0
Word dat#,0 = 9812,3484,60000,22315
res& = cryrst_(dat#,8)
wert$ = Str $(res&)
print worth$
Waitinput
nProc cryrst_
Parameters ber#,ps&
Declare s&,res&
If ps& MOD 2 = 0
s& = (ps&\2)-1
Else
s& = (ps&\2)
EndIf
WhileLoop 0,s&
res& = res&+word(ber#,&loop*2)
If res& > 20000
res& = (res&-20000)
Endif
EndWhile
res& = (res&+ps&)
Return res&
ENDPROC
there this a Statement ? |
|
|
| |
|
|
|
« this Posting watts as Solution marked. » |
|
| In nProcs with declare declared variables haven't same the value 0, The Variable becomes of course declared but it'll your no worth allocated and the worth comes then from memory and can discretionary his.
differently is it (naturally) if one within nProcs with var declared z.B. CompileMarkSeparation or kürzer: CompileMarkSeparation |
|
|
| |
|
|
|
|
| Bereichsvariablenparameter are no nativ supports type, übermittle times the address as Long. (means addr(ber#) instead of (ber).
After logischen Fehlern have I at Überfliegen not geschaut. |
|
|
| |
|
|
|
Georg Teles | |
|
| |
|
|
|
Georg Teles | trouble resolved:
I observe, that it with XPSE it very important is, defined variables, with them one operates, on 0 or a worth To settle, whom one need... CompileMarkSeparation now supply sowohl with XProfan compiled & gelinkte View source as well as with XPSE whom same korrekten worth |
|
|
| |
|
|
|
E.T. | Hm, the in wonder me still something: should whom new declarierte variables >Declare c&,d& < not really on "0", d.h. empty his ??
alas, see straight: in the Eingans-Posting declarierst You res& 2x, once at Program-Start and then again in Proc / nProc.
with "Problem gelöst" declarierst You then in the "nProc-Schnipsel" c& and b& , means new variables. i think time, in the "Doppel-Declare" lying the bunny bury (ungetestet).
what me wundert is, the XProfan with your first example in the first mail not bleats, the The Variable already declariert is .
in the Help is go ahead reading
any variables, The in Procedures declared go, only there pub validly. The relative Speicherplatz becomes with leave the procedure again freigegegen
what happens, if in Proc variables declariert go, which already in the Hauptprogramm decl. get, the can us well Roland answer
Frag now Please not, Why very "um 7 more "... ... vlt. has IF Yes for this drop "Die glorreichen Sieben" in XPSE installed |
|
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 09/17/14 ▲ |
|
|
|
|
Georg Teles | E.T. (17.09.14)
alas, see straight: in the Eingans-Posting declarierst You res& 2x, once at Program-Start and then again in Proc / nProc. ... i think time, in the "Doppel-Declare" lying the bunny bury (ungetestet).
negative, have straight with others variables tested, selbes Result, exakt circa 7 larger if I The variables to the Declare not nulle
möglicherweise must no Variable 0 his and the Declare the "leeren Variable" the value 7 zuweist ?
E.T. (17.09.14)
what happens, if in Proc variables declariert go, which already in the Hauptprogramm decl. get, the can us well Roland answer
the would me but too interested, of my experience to goes pub to global, have in my Programs but never this Error made, only in Codesnippets tested |
|
|
| |
|
|
|
RGH | If in a procedure variables declared go, also already in the Hauptprogramm declared are, then are The in the Hauptprogramm deklarierten variables in the procedure not visible, d.h. you can in the procedure weder red yet changed go.
Greeting Roland |
|
|
| XProfan X2Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 09/17/14 ▲ |
|
|
|
|
| In nProcs with declare declared variables haven't same the value 0, The Variable becomes of course declared but it'll your no worth allocated and the worth comes then from memory and can discretionary his.
differently is it (naturally) if one within nProcs with var declared z.B. CompileMarkSeparation or kürzer: CompileMarkSeparation |
|
|
| |
|
|
|
Georg Teles | Ahh, many Thanks ! now are both ask clarified been. With the Declare declared too, that in each Beispielcode end% to the Whilenot-Loop tradiztionell with Clear deleted or as var end% = 0 declared and to safety on 0 staid becomes. these since Programmiertanfang on by me to that standard become because with my Programs often same variables number of times uses go, zB. temporary, but accurate hereon have I only yet never geschaut |
|
|
| |
|
|