Posted by Jeff Cinelli on June 13, 2012 at 18:56:32:
In Reply to: Re: c32 ? posted by Neil badger on June 13, 2012 at 03:22:25:
Hey Badge
There's a few things you may want to know here.
1. Is the machine I'm coming in on running 16 or 32 bit.
2. Is the current program I'm running compiled with 16 or 32 bit program? (If you're able to run it, of course)
3. Is any given program compiled with C16 or C32?
Here's some code to address #1 and #2:
P$=PSTAT(PARTITION$)
IF SUB(P$,218,1) EQ '1'
COMET1632$='Comet32 Operating System'
ELSE
COMET1632$='Comet16 Operating System'
ENDIF
!
IF SUB(P$,219,1) EQ '1'
COMETPGM$='THIS PROGRAM WAS COMPILED UNDER COMET32'
ELSE
COMETPGM$='THIS PROGRAM WAS COMPILED UNDER COMET16'
ENDIF
Here's some code for #3:
Given: W0$ is the object you're wondering about, and W1$ is the directory:
STAT$=FSTAT(W0$,DIR=W1$)
X1632$=SUB(STAT$,135,4)
IF X1632$ EQ '@00000000@' COMET32FLAG=FALSE
IF X1632$ NE '@00000000@' COMET32FLAG=TRUE
Hope this helps!
Jeff
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.