Difference in Comet 16 & Comet 32


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

Posted by Robert G Laurin on December 06, 2010 at 09:08:59:

Is there a way in the conditional compiling to know if we're compiling a source in Comet 16 or Comet 32 ?

Because of some small differences in the way some stuff is handled, I have to make 2 versions of similar programs (Comet16 vs Comet32). Obviously the source will be different but they do share a couple of INCLUDE files that may have slight difference depending of the Comet version used.

Is there something like a compiler constant that can be used to test for Comet32 ?

Something like:

.if Comet32
...Do the Comet32 way...
.else
...Do it the old way...
.endif

The one difference I just encountered has to be with the way the Sharp (#) Buffer works. We all know that the # buffer holds the buffer for the last I/O. I have a program that checks the last byte of a record using a format with @(position);myFlag$ and under Comet32 it always return the first byte of the record.

Sample pseudo code:

length 1 & local myFlag$
Length 4.0 & local LastCol

Flag: Format @(LastCol);myFlag$

...

Let LastCol = 99 ! Last position for a 100 byte recordsize

...

Do
Extract (myFile,myFormat) Excp=ExcpEOF
!
Input (#,Flag) ! Get flag on LastByte
If myFlag$ = ...
... Do some magic...
Let myFlag$ = 'Y'
Update (myFile,Flag) ! Update Flag in Last Position
else
Inquire (myFile,mYFormat) ! Release Extract
endif
!
Loop

With Comet32 I always get the first byte. The Update () works fine.



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 ]