Need Explanation
Posted in 2003
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
These are informix/4GL lines. I am writing equivalent perl code Can anyone explain me what this code performs sdate be any date ------------------ let mnth = month(sdate) let yr = year(sdate) # let edatec = mnth using "&&", "/01/", yr using "&&&&" let edate = edatec # let edate = extend(edate) + 1 units month - 1 units day I have problems on how to translate to Perl on # marked lines Kaladhaur
Kaladhaur Palaniappa wrote: > > These are informix/4GL lines. I am writing equivalent perl code > > Can anyone explain me what this code performs > > sdate be any date > ------------------ > > let mnth = month(sdate) > let yr = year(sdate) > # let edatec = mnth using "&&", "/01/", yr using "&&&&" Give me a full first of the month date based on mnth and yr > let edate = edatec > # let edate = extend(edate) + 1 units month - 1 units day Set edate to the end of the next month > > I have problems on how to translate to Perl on # marked lines > > Kaladhaur -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
On Thu, 07 Aug 2003 05:46:45 -0400, Kaladhaur Palaniappa wrote: Paul's explanation of the lines beginning with '#' is correct but you should note that those are comments. The '#' character comments out the following characters to the end of the line in 4GL. Art S. Kagel > These are informix/4GL lines. I am writing equivalent perl code > > Can anyone explain me what this code performs > > sdate be any date > ------------------ > > let mnth = month(sdate) > let yr = year(sdate) > # let edatec = mnth using "&&", "/01/", yr using "&&&&" > let edate = edatec > # let edate = extend(edate) + 1 units month - 1 units day > > I have problems on how to translate to Perl on # marked lines > > Kaladhaur