CompuServe Thread

#Modula-2

3 messages in this thread
#46294From: Dan MooreDec 30, 1986 5:56 PM
Can't help with the CLI questions (never looked at it). BPTRs are pretty simple, they are the pointers used by BCPL. BCPL can only address the memory as long words so it`s pointers are perverse (that is a comment on BCPL). Basicly multiply the BPTR by 4 and you have a "real" pointer that C or Modula-2 can use. (Remember that anything a BPTR points at must be long word aligned.)
#46471From: Jim VogelDec 31, 1986 5:13 PM
Dan, Thanks for the reply; I now understand how to convert from a BPTR to a "real" pointer and what the difference is. However, what is a BCPL? Also is a filelock, or filehandle a pointer to a file? And how does a filelock for a RAW: (opened with DOSfiles.Open) relate to a BPTR or a "real" pointer? Thanks, Jim Vogel
#46607From: Dan MooreJan 1, 1987 3:05 PM
BCPL is yet another language. (It is one of the ancestors of C.) I've never used it so I can't tell you anything else about it. A file lock is a pointer to a data structure that AmigaDOS uses to locate the file. But from the program side it normally doesn't matter what it is (other than it being a 32 bit number) since there normally isn't any reason for a program to reference anything off that pointer. It is just passed to AmigaDOS as a parameter in various i/o calls. If you really want to know what is in the file lock structure you should look it up in the header files that come with one of the C's or in the RKM (I think it is in the RKM, not positive though). When you start looking at the various AmigaDOS data structures you will find that they contain a mixture of normal pointers and BPTRs, and it is a big job keeping track of which is which.