Re: Compiler Comet16 vs Comet32


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G laurin on June 05, 2014 at 07:59:42:

In Reply to: Re: Compiler Comet16 vs Comet32 posted by Barbara Brazil on June 03, 2014 at 13:41:06:

Barb,

I traced my program and I identified the section of code where the variable get clobbered....

The variable is not referenced in that section of the code. I narrowed to a couple of lines that simply does Windoze Printing (MoveTo) (LineTo) and (DrawText).

This same routine is executed twice and the damage happens on the 2nd pass. First time SERVICE=2 and second time SERVICE=3

See code & Trace below.


PS.SERVICE:
!
WORK$=STR(COPY)+STR(SUMMARY)+STR(SERVICE)+STR(TCOUNT(1))+STR(TCOUNT(2))+STR(TCOUNT(3))+STR(TSPEC(3)) !************************* TRACE **
TRACE PRINT WORK$ !***************************************************************************************************** TRACE **

IF TSPEC(SERVICE) = 0 RETURN
!
IF CURLINE + (6 * LINE.HEIGHT) > PAGE.BREAK
GOSUB BREAK.PAGE
ENDIF
!
GOSUB SET.FONT.TITLE
LET OUT$(1) = 'Part S'
PRINT (LP) (DRAWTEXT=PtrX1,CURLINE,PtrX2,PAGE.BREAK,2896);OUT$(1);NullByte$
CURLINE = CURLINE + WPFONTHEIGHT(CURRENT.FONT) !!3.2
GOSUB SET.FONT.STANDARD

WORK$='1330:'+STR(COPY)+STR(SUMMARY)+STR(SERVICE)+STR(TCOUNT(1))+STR(TCOUNT(2))+STR(TCOUNT(3))+STR(TSPEC(3)) !************************* TRACE **
TRACE PRINT WORK$ !***************************************************************************************************** TRACE **

LET OUT$(1) = 'Extra Services' ! RGL - 060222
PRINT (LP) (DRAWTEXT=PtrX1,CURLINE,PtrX2,PAGE.BREAK,2896);OUT$(1);NullByte$
CURLINE = CURLINE + WPFONTHEIGHT(CURRENT.FONT) * 1.2
!
LET PtrY1 = CURLINE
PtrX1 = MARGIN.LEFT + (4 * WPFontAveCharWidth(1))
PtrY2 = PtrY1 + (4 * LINE.HEIGHT)
PtrX2 = MARGIN.LEFT + (72 * WPFontAveCharWidth(1)) !! was 69
PRINT (LP) (MOVETO=PtrX1,PtrY1);(LINETO=PtrX2,PtrY1);_
(LINETO=PtrX2,PtrY2);(LINETO=PtrX1,PtrY2);(LINETO=PtrX1,PtrY1)
LET PtrX1 = PtrX1 + (31 * WPFontAveCharWidth(1)) !! was 28
PRINT (LP) (MOVETO=PtrX1,PtrY1);(LINETO=PtrX1,PtrY2)
LET PtrX1 = PtrX1 + (11 * WPFontAveCharWidth(1))
PRINT (LP) (MOVETO=PtrX1,PtrY1);(LINETO=PtrX1,PtrY2)
LET PtrX1 = PtrX1 + (11 * WPFontAveCharWidth(1)) !! was 10
PRINT (LP) (MOVETO=PtrX1,PtrY1);(LINETO=PtrX1,PtrY2)
LET PtrY1 = CURLINE + (1 * LINE.HEIGHT)
PtrY2 = CURLINE + (3 * LINE.HEIGHT)
PtrX1 = MARGIN.LEFT + (4 * WPFontAveCharWidth(1))
PRINT (LP) (MOVETO=PtrX1,PtrY1);(LINETO=PtrX2,PtrY1);_
(MOVETO=PtrX1,PtrY2);(LINETO=PtrX2,PtrY2)
!
LET PtrX1 = MARGIN.LEFT
PtrX2 = MARGIN.RIGHT

WORK$='1358:'+STR(COPY)+STR(SUMMARY)+STR(SERVICE)+STR(TCOUNT(1))+STR(TCOUNT(2))+STR(TCOUNT(3))+STR(TSPEC(3)) !************************* TRACE **
TRACE PRINT WORK$ !***************************************************************************************************** TRACE **

LET OUT$(1) = ' Service Fee Pieces ' + _
' Total Postage' + CRLF$
LET FEE = ZFEE(SERVICE,1) * 1.0000 / SPEC(SERVICE,1)
LET OUT$(2) = 'S4 Delivery Confirmation (DC) ' + STR(FEE) + ' '+_
STR(SPEC(SERVICE,1)) + ' ' + STR(ZFEE(SERVICE,1)) + CRLF$
LET FEE = ZFEE(SERVICE,2) * 1.0000 / SPEC(SERVICE,2)
LET OUT$(3) = 'S11 Signature Confirmation (SC) ' + STR(FEE) + ' ' +_
STR(SPEC(SERVICE,2)) + ' ' + STR(ZFEE(SERVICE,2)) + CRLF$
LET OUT$(5) = ' Part S Total ' + _
' ' + STR(TFEE(SERVICE)) + CRLF$

WORK$='1372:'+STR(COPY)+STR(SUMMARY)+STR(SERVICE)+STR(TCOUNT(1))+STR(TCOUNT(2))+STR(TCOUNT(3))+STR(TSPEC(3)) !************************* TRACE **
TRACE PRINT WORK$ !***************************************************************************************************** TRACE **

PRINT (LP) (DRAWTEXT=PtrX1,CURLINE,PtrX2,PAGE.BREAK,2896);_
OUT$(1);OUT$(2);OUT$(3);OUT$(4);OUT$(5);OUT$(6);NullByte$

WORK$='1378:'+STR(COPY)+STR(SUMMARY)+STR(SERVICE)+STR(TCOUNT(1))+STR(TCOUNT(2))+STR(TCOUNT(3))+STR(TSPEC(3)) !************************* TRACE **
TRACE PRINT WORK$ !***************************************************************************************************** TRACE **

This is this portion of the TRACE LABELS & TRACE PRINT


UMP-TEST.IBS: 1315 PS.SERVICE:
1 2 3 0 4 380 380
#WPRINT:310060 SET.FONT.TITLE:
#WPRINT:320090 SET.FONT:
LOGFONT.IBS: 4 GDI.INITLOGFONT:
COSPTR.IBS: 249 PTR.SELECTFONT:
#WPRINT:300060 SET.FONT.STANDARD:
#WPRINT:320090 SET.FONT:
LOGFONT.IBS: 4 GDI.INITLOGFONT:
COSPTR.IBS: 249 PTR.SELECTFONT:
1330:1 2 3 0 4 380 380
1358:1 2 3 0 4 236 380
1372:1 2 3 0 4 2 380
1378:1 2 3 0 4 2 380

This is a weird one !!


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]