pkahn@meridian.ads.com (Phil Kahn) (06/21/88)
I have been trying to build a Hypercard XFCN to drive a digitizer using buttons. Here's the problem. It appears that MPW Pascal Units do not allow "global" variables. That is, variable declations at the INTERFACE or IMPLEMENTATION level seem to cause the link to vomit with "Error: data initialization routine not called". This has something to do, I believe, with _datainit not being called out of the unit (which by the way it seriously doesn't like either). Since Hypercard XFCNs are units with special segment name and entry point specified, this seriously affects their implementation. Have I found the problem? Or in fact, can units have global variables. When driving a board digitizer, there are board addresses and status info which would be a serious hassle to pass back and forth to hypercard which has no need to access this information. In short, don't MPW Pascal units support generic data types and packages which often require local variables which persist among calls? Please let me know. I am desperate after spending more than a day poring over manuals which just do not specifically answer these questions. Is there a workaround other than passing variables in and out which are local to the unit and used for intra-unit communication? phil...