From: Chris <cbo...@mi...> - 2002-09-07 20:41:13
|
First of all, I'd like to point out a feature of Cobol that most other languages aren't good at - storage handling. Take a look at this Linkage Section: LINKAGE SECTION. 01 LnkWAtkTab SYNC. 05 LnkWAtkRec OCCURS 20 TIMES INDEXED BY WAR-Idx. 10 LnkCritMinRoll OCCURS 5 TIMES INDEXED BY CMR-Idx. PIC 999 COMP. 10 LnkDiv PIC 99 COMP. 10 LnkCritTyp PIC XXX. The sync is necessary so C knows where a structure begins - on a word or half-word boundary. Without it the call returns gibberish. If it were Cobol calling this module the sync wouldn't be necessary! Here's the problem: where are the indexes' storage placed? I've got stuctures in C that don't include them: typedef struct { char WCd[2]; int CritMinRoll[5]; int Div; char CritTyp[3]; } WAtkTab; WAtkTab Weapon[20]; |