Commit fbc65b7d by wangguangchao

goto语句翻译提交

parent 307be57f
......@@ -59,6 +59,8 @@ void printSummons()
String lineact = NULLSTR;
String printa = NULLSTR;
String couval = NULLSTR;
ALabel:
while(true){
for(int i = 1;i <= actcount;i++)
{
lineact = Platform.getLine( $actstm.getValue(), i );
......@@ -67,10 +69,13 @@ void printSummons()
if( Platform.compareTo(couval, "W") != 0 )
{
flg1 = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto A
//return ; // #### goto A
break ALabel;
}
}
// #######TODO 改写 LABEL与GOTO #### label A
break ALabel;
}
// #### label A
BigDecimal dtotal = null;
BigDecimal ctotal = null;
int strcnt = 0;
......@@ -182,6 +187,8 @@ void printSummons()
//打印表外记帐凭证
actcount = Platform.streamCount( $actstm.getValue() );
boolean flg2 = false;
BLabel:
while(true){
for(int k = 1;k <= actcount;k++)
{
lineact = Platform.getLine( $actstm.getValue(), k );
......@@ -190,10 +197,13 @@ void printSummons()
if( Platform.compareTo( couval , "W" ) == 0 )
{
flg2 = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto B
//return ; // #### goto B
break BLabel;
}
}
// #######TODO 改写 LABEL与GOTO #### label B
break BLabel;
}
// #### label B
if( flg2 )
{
if( flg1 )
......
......@@ -8,7 +8,7 @@ void checkADRBIC(String argbic)
if( Platform.len( argbic ) != 8 && Platform.len( argbic ) != 11 && Platform.len( argbic ) > 0 )
{
Platform.errorMessage( #CT000064 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
String bic = Platform.trim( argbic );
String let = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
......@@ -22,20 +22,20 @@ void checkADRBIC(String argbic)
{
// if substring is not found, return value is 0
Platform.errorMessage( #CT000065 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
// position 7 Location-Code A-Z and 2-9 are allowed
if( Platform.pos( let, Platform.mid( bic, i, 1 ) ) == 0 && Platform.pos( "23456789", Platform.mid( bic, 7, 1 ) ) == 0 )
{
Platform.errorMessage( #CT000066 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
// position 8 Location-Code A-Z exept O and 0-9 are allowed
if( Platform.pos( "ABCDEFGHIJKLMNPQRSTUVWXYZ", Platform.mid( bic, 8, 1 ) ) == 0 && Platform.pos( num, Platform.mid( bic, 8, 1 ) ) == 0 )
{
Platform.errorMessage( #CT000067 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
// position 9-11 Branch-Code A-Z and 0-9 are allowed
if( Platform.len( bic ) > 8 )
......@@ -45,10 +45,10 @@ void checkADRBIC(String argbic)
if( Platform.pos( let, Platform.mid( bic, i, 1 ) ) == 0 && Platform.pos( num, Platform.mid( bic, i, 1 ) ) == 0 )
{
Platform.errorMessage( #CT000068 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
}
\ No newline at end of file
void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argument<String> argdiatyp,Argument<Date> argdate,Argument<String> argcod,Argument<String> argnam,Argument<String> argfrm,Argument<String> argflag,Argument<Boolean> arglast)
{
// read ATC entry for each entry in $codes from cache and execute rule
// #######TODO 改写 LABEL与GOTO #### label NextEntry
// #### label NextEntry
NextEntryLabel:
while(true){
int tabpos = Platform.pos( argcodes.value, "\t" );
String actCode = NULLSTR;
String errTxt = NULLSTR;
......@@ -14,7 +16,8 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
if( ! atcConditionTrue( $atcsub\atcdia\ignflg.getValue(), $atcsub\atcdia\cnd.getValue(), $atcsub\atcdia\cndfld1typ.getValue(), $atcsub\atcdia\cndfld1.getValue(), $atcsub\atcdia\cndfld2typ.getValue(), $atcsub\atcdia\cndfld2.getValue() ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
continue NextEntryLabel;
}
arggroup.value = $atcsub\atcdia\grp;
switch( $atcsub\atcdia\dattyp.getValue() )
......@@ -27,7 +30,8 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
break;
default:
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), "Function not defined" );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
continue NextEntryLabel;
}
break;
case "CONST":
......@@ -36,7 +40,8 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
continue NextEntryLabel;
}
break;
case "FLD":
......@@ -45,7 +50,8 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
continue NextEntryLabel;
}
break;
}
......@@ -56,13 +62,15 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DATNUM", Platform.toString( $atcsub\atcdia\datnum.getValue() ), errTxt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
continue NextEntryLabel;
}
}
// no creation of diary, if date empty
if( Platform.isEmpty( argdate.value ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
continue NextEntryLabel;
}
argcod.value = $atcsub\atcdia\cod;
argnam.value = $atcsub\atcdia\nam;
......@@ -76,5 +84,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
arglast.value = true;
}
break NextEntryLabel;
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ boolean atcConditionTrue(String argignflg,String argcnd,String argcndfld1typ,Str
if( ! Platform.isEmpty( argignflg ) )
{
res = false;
return res; // #######TODO 改写 LABEL与GOTO #### goto done
return res; // #### goto done
}
String field1 = "";
String errTxt = NULLSTR;
......@@ -22,7 +22,7 @@ boolean atcConditionTrue(String argignflg,String argcnd,String argcndfld1typ,Str
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATC\\CNDFLD1", argcndfld1, errTxt );
res = false;
return res; // #######TODO 改写 LABEL与GOTO #### goto done
return res; // #### goto done
}
}
}
......@@ -41,7 +41,7 @@ boolean atcConditionTrue(String argignflg,String argcnd,String argcndfld1typ,Str
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATC\\CNDFLD2", argcndfld2, errTxt );
res = false;
return res; // #######TODO 改写 LABEL与GOTO #### goto done
return res; // #### goto done
}
}
}
......@@ -113,7 +113,7 @@ boolean atcConditionTrue(String argignflg,String argcnd,String argcndfld1typ,Str
default:
Platform.sysDump( "undefined condition in ATC entry" );
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
return res;
}
\ No newline at end of file
void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Argument<String> argfeeflg,Argument<Integer> argfeeunt,Argument<Date> argdatfrom,Argument<Date> argdattil,Argument<Boolean> arglast)
{
// read ATC entry for each entry in $codes from cache and execute rule
// #######TODO 改写 LABEL与GOTO #### label NextEntry
// #### label NextEntry
NextEntryLabel:
while(true){
int tabpos = Platform.pos( argcodes.value, "\t" );
String actCode = NULLSTR;
String errTxt = NULLSTR;
......@@ -14,7 +16,8 @@ void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Arg
{
if( ! atcConditionTrue( $atcsub\atcfee\ignflg.getValue(), $atcsub\atcfee\cnd.getValue(), $atcsub\atcfee\cndfld1typ.getValue(), $atcsub\atcfee\cndfld1.getValue(), $atcsub\atcfee\cndfld2typ.getValue(), $atcsub\atcfee\cndfld2.getValue() ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
argfeetyp.value = $atcsub\atcfee\cod;
argfeeflg.value = $atcsub\atcfee\flg;
......@@ -29,7 +32,8 @@ void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Arg
break;
default:
atcCallSysdumpInfo( "ATCFEE\\DATFRO", $atcsub\atcfee\datfro.getValue(), "Function not defined" );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
break;
default:
......@@ -38,7 +42,8 @@ void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Arg
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCFEE\\DATFRO", $atcsub\atcfee\datfro.getValue(), errTxt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
}
switch( $atcsub\atcfee\dattiltyp.getValue() )
......@@ -51,7 +56,8 @@ void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Arg
break;
default:
atcCallSysdumpInfo( "ATCFEE\\DATTIL", $atcsub\atcfee\dattil.getValue(), "Function not defined" );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
break;
default:
......@@ -60,7 +66,8 @@ void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Arg
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCFEE\\DATTIL", $atcsub\atcfee\dattil.getValue(), errTxt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
}
argfeetyp.value = actCode;
......@@ -71,5 +78,7 @@ void getNextEntryForFee(Argument<String> argcodes,Argument<String> argfeetyp,Arg
{
arglast.value = true;
}
break NextEntryLabel;
}
}
\ No newline at end of file
......@@ -17,9 +17,11 @@ String cbsGetAllExtIds(IModule obj,String cbcarg)
String sql = "Where OBJTYP = '" + objTyp + "' AND OBJINR = '" + objInr + "'";
sql = sql + " AND CBC = '" + cbcarg + "' ORDER BY EXTID";
Platform.dbSelectCursor( $cbb, sql );
// #######TODO 改写 LABEL与GOTO #### label CBBLoop
// #### label CBBLoop
CBBLoopLabel:
while(true){
Platform.DBFetch( $cbb );
while( Platform.errorCode() <= 0 )
if( Platform.errorCode() <= 0 )
{
if( Platform.compareTo(lastId, $cbb\extid.getValue()) != 0 )
{
......@@ -40,13 +42,16 @@ String cbsGetAllExtIds(IModule obj,String cbcarg)
}
lastId = $cbb\extid;
}
continue ; // #######TODO 改写 LABEL与GOTO #### goto CBBLoop
//return ; // #### goto CBBLoop
continue CBBLoopLabel;
}
break CBBLoopLabel;
}
if( ! Platform.isEmpty( emptyId ) )
{
extIds = "\r\n" + extIds;
}
// #######TODO 改写 LABEL与GOTO #### label CBBDone
// #### label CBBDone
return extIds;
}
\ No newline at end of file
......@@ -27,12 +27,14 @@ void cbsGetBalanceReleasedOnly(#cbb cbbarg,IModule obj,String cbcarg,String exti
sql = sql + " AND DAT <= " + Platform.dbSqlDate( perdat );
sql = sql + " AND RELFLG = 'E'";
Platform.dbSelectCursor( $cbe, sql + " ORDER BY DAT, INR" );
// #######TODO 改写 LABEL与GOTO #### label CBELoop
// #### label CBELoop
CBELoopLabel:
while(true){
Platform.DBFetch( $cbe );
if( Platform.errorCode() == tdOdbcNotFound )
{
Platform.setErrorCode( 0, "" );
return ; // #######TODO 改写 LABEL与GOTO #### goto CBEDone
return ; // #### goto CBEDone
}
else
{
......@@ -54,7 +56,9 @@ void cbsGetBalanceReleasedOnly(#cbb cbbarg,IModule obj,String cbcarg,String exti
$$cbbarg\xrfamt = Platform.numAdd($$cbbarg\xrfamt.getValue() , $cbe\xrfamt.getValue());
}
}
return ; // #######TODO 改写 LABEL与GOTO #### goto CBELoop
// #######TODO 改写 LABEL与GOTO #### label CBEDone
//return ; // #### goto CBELoop
continue CBELoopLabel;
}
// #### label CBEDone
}
\ No newline at end of file
......@@ -24,12 +24,17 @@ static void cbsReorgCBB(IModule obj)
}
sql = sql + " ORDER BY DAT, INR";
Platform.dbSelectCursor( $\cbsmod\cbe, sql );
// #######TODO 改写 LABEL与GOTO #### label NxtCbe
// #### label NxtCbe
NxtCbeLabel:
while(true){
Platform.DBFetch( $\cbsmod\cbe );
if( Platform.errorCode() <= 0 )
{
$\cbsmod.createCbbEntries( $\cbsmod\cbe );
return ; // #######TODO 改写 LABEL与GOTO #### goto NxtCbe
//return ; // #### goto NxtCbe
continue NxtCbeLabel;
}
break NxtCbeLabel;
}
if( Platform.errorCode() != tdOdbcNotFound )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment