| |
|
|
Detlef Jagolski | Hello Sebastian,
have subesquent code CompileMarkSeparation
Proc AddTime
Parameters Zeit1$, Zeit2$
var Stunden1% = Val(SubStr$(Zeit1$,1,":"))
var Menuten1% = Val(SubStr$(Zeit1$,2,":"))
var Sekunden1% = Val(SubStr$(Zeit1$,3,":"))
var Stunden2% = Val(SubStr$(Zeit2$,1,":"))
var Menuten2% = Val(SubStr$(Zeit2$,2,":"))
var Sekunden2% = Val(SubStr$(Zeit2$,3,":"))
var Time1% = (Stunden1% * 3600) + (Menuten1% * 60) + Sekunden1%
var Time2% = (Stunden2% * 3600) + (Menuten2% * 60) + Sekunden2%
var Sekundenzahl% = Time1% + Time2%
var Sekunden% = Sekundenzahl% MOD 60
var Minuten% = (Sekundenzahl% / 60) MOD 60
var Stunden% = (Sekundenzahl% / 60 / 60) MOD 24
var Zeit$ = Format$("00",Stunden%)+":"+Format$("00",Minuten%)+":"+Format$("00",Sekunden%)
Return Zeit$
ENDPROC
Profan2Cpp power from it CompileMarkSeparationp_variant Proc_addtime(int n, ...)
{
BuildStack();
PushVar(nMenuten1);
PushVar(nMenuten2);
PushVar(nMinuten);
PushVar(nSekunden);
PushVar(nSekunden1);
PushVar(nSekunden2);
PushVar(nSekundenzahl);
PushVar(nStunden);
PushVar(nStunden1);
PushVar(nStunden2);
PushVar(nTime1);
PushVar(nTime2);
PushVar(sZeit);
PushVar(sZeit1);
PushVar(sZeit2);
sZeit1 = StringParam(1);
sZeit2 = StringParam(2);
nStunden1 = Value(SubString(sZeit1, 1, _S(":")));
nMenuten1 = Value(SubString(sZeit1, 2, _S(":")));
nSekunden1 = Value(SubString(sZeit1, 3, _S(":")));
nStunden2 = Value(SubString(sZeit2, 1, _S(":")));
nMenuten2 = Value(SubString(sZeit2, 2, _S(":")));
nSekunden2 = Value(SubString(sZeit2, 3, _S(":")));
nTime1 = (nStunden1*3600) + (nMenuten1*60) + nSekunden1;
nTime2 = (nStunden2*3600) + (nMenuten2*60) + nSekunden2;
nSekundenzahl = nTime1 + nTime2;
nSekunden = sekundenzahl % mod60;
nMinuten = _D((nSekundenzahl) / _D(60))mod60;
nStunden = _D(_D((nSekundenzahl) / _D(60)) / _D(60))mod24;
sZeit = FormatString(_S("00"), _V(nStunden)) + _S(":") + FormatString(_S("00"), _V(nMinuten)) + _S(":") + FormatString(_S("00"), _V(nSekunden));
in the row nSekunden = sekundenzahl % mod60; I get a Error Message! Should The row not so looks nSekunden = _D(nsekundenzahl) mod60;?????
Error E2451 plan-Calc_Edition_2009.cpp 1925: Undefiniertes symbol sekundenzahl in function Proc_addtime(int,...) Error E2379 plan-Calc_Edition_2009.cpp 1926: In instruction missing ; in function Proc_addtime(int,...) Error E2379 plan-Calc_Edition_2009.cpp 1927: In instruction missing ; in function Proc_addtime(int,...)
Greeting
Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 06/28/09 ▲ |
|
|
|
|
Sebastian König | Hello Detlef,
thanks for Info! there runs well something at Operator-Parsing schief... I trouble me therefore and login me then again.
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 06/28/09 ▲ |
|
|
|
|
Sebastian König | I have The cause for Error straight found. If I it correctly. see, exit the trouble only Context with VAR on and concerns AND and OR just as How MOD. too the Syntax-Check gives irrtümlich a Error-Falschmeldung from.
I engage me now time with the Korrektur and mail you then a Mail with of/ one korrigierten Version. hopefully come I soon too time moreover, a offizielle Version 2.0c fertigzustellen...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 06/30/09 ▲ |
|
|
|
|
Detlef Jagolski | Hello Sebastian,
first once thanks for your Help. In stature$ must it too a problem give, have too yet no Time had it accurate To testing. features: No Error Message and Programmabsturz. is only one Info!!!
Greeting
Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 06/30/09 ▲ |
|
|
|