Errors in 64 bit migration.
Posted in 2004
This is a multi-part message in MIME format. ------=_NextPart_000_004D_01C45EBC.279AB750 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi All, =20 =20 We are having one more migration issue on related to display in 4gl. We are getting "Form Statement error number -1332". Description of this error says " Subscript out of range". We have written sample code to simulate this problem. I have also = pasted the sample code for your reference. =20 { test.4gl} MAIN define xyz1 integer call moa01_frm() sleep 2 display "Came out from function" call get_width1() returning xyz1 display "IN MAIN", xyz1 sleep 2 end MAIN =20 function moa01_frm() define position integer define xyz integer open form lang_frm1 from "f_moa_en" display form lang_frm1 call get_width1() returning position display "POSITION", position call get_width1() returning xyz display "IN MOA FUNC", xyz sleep 2 end function =20 /* get_width1.c */ #include <stdio.h> #include <sqlfm.h> =20 #define bool char #define CHAR short =20 typedef struct window { short _cury, _curx; short _maxy, _maxx; short _begy, _begx; short _flags; bool _clear; bool _leave; bool _scroll; CHAR **_y; short *_firstch; short *_lastch; short _attr; } WINDOW; extern _EFwindow *topwin, *_Wscreen; =20 int get_width1( int nargs ) { static WINDOW *win; short win_width; =20 win =3D (WINDOW *) topwin->win; =20 if ( topwin =3D=3D _Wscreen ) win_width =3D win->_maxx; else win_width =3D win->_maxx - 4; =20 retshort(win_width); return(1); } =20 In the above 4gl code, when the get_width1() is called immediately after = the "display form" statement is executed, it returns the win_width value to = the 4gl module. =20 In 32 bit environment the value of the win_width remains same, after successive get_width1() call. But in case of 64 bit environment the first get_width1() call returns = the proper value, but subsequent call returns 0.=20 =20 Since in our application the get_width1() call is made many places after = the "display form" statement execution we are facing some issues. Please let = us know is this behaviour is different in 64 bit of Informix. Is there any = work around. =20 =20 For your reference we have also attached the output generated in our environment for the sample application in both 32 & 64 bit =20 64 Bit output POSITION 41 IN MOA FUNC 0 Came out from function IN MAIN 0 =20 32 Bit output =20 POSITION 80 IN MOA FUNC 80 Came out from function IN MAIN 80 =20 We appreciate quick response on this. Thanks in advance.=20 =20 Regards, Vijay Kumar ------=_NextPart_000_004D_01C45EBC.279AB750 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20 "urn:schemas-microsoft-com:office:office" xmlns:w =3D=20 "urn:schemas-microsoft-com:office:word" xmlns:st1 =3D=20 "urn:schemas-microsoft-com:office:smarttags"><HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <TITLE>Message</TITLE> <META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR><o:SmartTagType = name=3D"place"=20 namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTagT= ype><!--[if !mso]> <STYLE>st1\\:* { BEHAVIOR: url(#default#ieooui) } </STYLE> <![endif]--> <STYLE>@font-face { font-family: Comic Sans MS; } @page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline } A:visited { COLOR: #606420; TEXT-DECORATION: underline } SPAN.MsoHyperlinkFollowed { COLOR: #606420; TEXT-DECORATION: underline } SPAN.EmailStyle17 { COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose } DIV.Section1 { page: Section1 } </STYLE> </HEAD> <BODY lang=3DEN-US vLink=3D#606420 link=3Dblue> <P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans = MS'"><o:p></o:p></SPAN></FONT></P> <DIV><FONT face=3D"Comic Sans MS"><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"><SPAN=20 class=3D562243410-30062004><FONT face=3DArial>Hi=20 All,</FONT></SPAN></SPAN></FONT></DIV> <DIV><FONT face=3DArial><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"><SPAN=20 class=3D562243410-30062004></SPAN></SPAN></FONT> </DIV> <DIV><FONT face=3DArial><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"><SPAN=20 class=3D562243410-30062004></SPAN></SPAN></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS"><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"><SPAN=20 class=3D562243410-30062004><FONT face=3DArial> W</FONT></SPAN>e are = having one=20 more migration issue on related to display in=20 4gl.<o:p></o:p></SPAN></FONT></DIV> <DIV class=3DSection1> <P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">We are getting = “Form=20 Statement error number -1332”. Description of this error says = “ Subscript out of=20 range”.<o:p></o:p></SPAN></FONT></P> <P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">We have written = sample=20 code to simulate this problem. I have also pasted the