Compiling errors after ported VO
Posted: Fri Jul 14, 2017 4:55 pm
I am trying to convert our VO application to X# using XPorter. For most part XPorter works great! But I am getting some weird errors when I try to build in Visual Studio using VO dialect. Here are some example of the errors:
Here is a snippet of code section:
cAcctgRec := '"'+"H"+'",'+ ; // Header Record
'"'+cBank+'",'+ ; // Bank Code
'"Y",'+ ; // Print Check?
"0"+','+ ; // Check Number
'"'+cVendor+'",'+ ; // Vendor No.
line 1870 // '"'+PadR(RTrim(SELF:SwapName(oNetMstr:minsname)),30," ")+'",'+ ; // Vendor Name - replaced 08.21.06
line 1871 '"'+PadR(RTrim(cInsName),30," ")+'",'+ ; // Vendor Name
'"'+SubStr(DToS(dTranDate),3)+'",'+ ; // Date
Here is the error: "XS9002 Parser: mismatched input '(' expecting EOS". The error is for line 1871. The fix is to delete the commented out line 1870.
The issue I have is with the next compiler error. I hope I can explain it clearly.
Here is a sample codes:
line 2268 cAcctgRec += '"'+DToS(dTranDate)+'",'+ ;
The compiler error is: XS9002 Parser: mismatched input '(' expecting EOS for line 2268.
If you look at the actual line of code, there is nothing wrong with it. The parenthesis match up. The causes are several lines above it. We have lines of code that is similar to this one: IF (aAcctg[n,4]==15.and.aAcctg[n,3]>0.00).or.(aAcctg[n,4]==5.and.aAcctg[n,3]<0.00)
Notice there is no space before or after "==" ".or." ">" ".and.". Once I put space in, this error went away.
There are several hundreds error like this. There are some similar errors, which do not go away even after I make the same fix. Maybe there are more lines of code above that need to be fixed. I'm still going through each line.
Can the compiler be updated to report the actual line that is causing the error? Also, is this an error?
Hopefully this post is clear.
Thanks,
Boonnam
Here is a snippet of code section:
cAcctgRec := '"'+"H"+'",'+ ; // Header Record
'"'+cBank+'",'+ ; // Bank Code
'"Y",'+ ; // Print Check?
"0"+','+ ; // Check Number
'"'+cVendor+'",'+ ; // Vendor No.
line 1870 // '"'+PadR(RTrim(SELF:SwapName(oNetMstr:minsname)),30," ")+'",'+ ; // Vendor Name - replaced 08.21.06
line 1871 '"'+PadR(RTrim(cInsName),30," ")+'",'+ ; // Vendor Name
'"'+SubStr(DToS(dTranDate),3)+'",'+ ; // Date
Here is the error: "XS9002 Parser: mismatched input '(' expecting EOS". The error is for line 1871. The fix is to delete the commented out line 1870.
The issue I have is with the next compiler error. I hope I can explain it clearly.
Here is a sample codes:
line 2268 cAcctgRec += '"'+DToS(dTranDate)+'",'+ ;
The compiler error is: XS9002 Parser: mismatched input '(' expecting EOS for line 2268.
If you look at the actual line of code, there is nothing wrong with it. The parenthesis match up. The causes are several lines above it. We have lines of code that is similar to this one: IF (aAcctg[n,4]==15.and.aAcctg[n,3]>0.00).or.(aAcctg[n,4]==5.and.aAcctg[n,3]<0.00)
Notice there is no space before or after "==" ".or." ">" ".and.". Once I put space in, this error went away.
There are several hundreds error like this. There are some similar errors, which do not go away even after I make the same fix. Maybe there are more lines of code above that need to be fixed. I'm still going through each line.
Can the compiler be updated to report the actual line that is causing the error? Also, is this an error?
Hopefully this post is clear.
Thanks,
Boonnam