C32/C16 Errata


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

Posted by Grant Foraker on August 05, 2016 at 13:25:24:

Some things that C16 OBJ's do under C32. That aren't C32 bugs :)

=====
1)C32 sometimes gives E16's if a field, like GOFLAG (1.0), passed in COMMON from a menu to a program doesn't align properly. C16 doesn't give this error so old, junky coding goes kaboom under C32. User tries again and the program runs fine.

===============
2) This one caused my recent post and mild embarrassment.

2725 FORMAT_
TI1$;TO1$;TI2$;TO2$ ! INPUT TIME IN/OUT

PRINT (0,2720) ! POSITION TO TIME INPUT
INPUT (0,2725)
!------------------- 07/25/2016 ------------------------------------------------
!--------- COMET16 RETURNS NULL FIELDS IF ALL FIELDS ARE BLANK -----------------
!--------- COMET32 RETURNS BLANKS IN ALL FIELDS --------------------------------
LET TI1$ = STRIP(TI1$)
LET TO1$ = STRIP(TO1$)
LET TI2$ = STRIP(TI2$)
LET TO2$ = STRIP(TO2$)
!-------------------------------------------------------------------------------
IF STRIP(TI1$) EQ '' GOTO 5000 ! NO TIME INPUT

5000! **** ABSENT CODE (NO TIME INPUT) ****
IF TO1$ NE '' GOTO 4000
IF TI2$ NE '' GOTO 4000
IF TO2$ NE '' GOTO 4000

Comet16 returns four null fields. The Qantel programmer (80's) relied on that. My goof was thinking that the STRIP(TI1$) was failing and not looking at 5000 and seeing the additional code there that also relied on null fields.

I still have lots of programs that have the following code.

--------- CL -----
2745 FORMAT BEGIN$;END$

INPUT (0,2745)
IF BEGIN$ EQ ' ' OR BEGIN$='' GOTO 3062 ! BEGINNING OF RANGE NOT
BEGIN$=BEGIN$+' '

IF END$ EQ '' GOTO 3065 ! END OF RANGE NOT SPECIF
END$=END$+' '

!------------------- CL1 -------------------------------------------------------

IF END$ EQ '' GOTO 3450 ! PRINT TO END OF FILE
IF CNBR$ GT END$ GOTO 9000 ! END OF RANGE -- ALL DON

BEGIN$ still works OK with blanks or null. But END$ is going to need fixing as the code relies on null values.

======================
3) Right to Left vs Left to Right.

This is bad coding that has worked from Qantel thru C16. The Right/Left is my guess on what might be different between C32 and C16.

LENGTH 6.0 & COMMON TOTHRS,WBUDHRS
LENGTH 7.0 & COMMON WSAMT,WBUDAMT

2825 FORMAT _
@(00,24);(SB);' CRAFT# ';WCRAFT1;' HOURS ';(SF);(TP);_
(RJ);WBUDAMT;(TP);(BF);@(0)

WBUDAMT = JDCBUD(WCRAFT)
PRINT (0,2825) ! CRAFT HOURS
INPUT (0) WBUDHRS
JDCBUD(WCRAFT) = WBUDHRS

Programmer used the WBUDAMT (7.0) field to display to the screen and the INPUT the WBUDHRS (6.0) field.

T = TP, R = RJ, * = hidden decimal point.

TR*ABCDEFG-T nine characters displayed

C16 inputs ABCDEFG- these eight characters.
C32 inputs *ABCDEFG these eight characters.

Unless a negative number is displayed or INPUT you don't know see anything wrong happening.

The fix was to replace WBUDAMT with WBUDHRS for consistency.
=============
4) Numeric buffer

Relying on the Qantel and C16 numeric buffer led to code like this.

LET ORG$ = SUB(STR(ORG + 99),15,2)

C32 code should be like this.

LET ORG$ = SUB(STRIP(STR(ORG + 99)),2,2)




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 ]