Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!umd5!umbc3!kend From: kend@umbc3.UMD.EDU (Ken Dahl) Newsgroups: comp.os.vms Subject: passing strings from COBOL to Pascal Message-ID: <1100@umbc3.UMD.EDU> Date: 21 Jul 88 21:37:32 GMT Reply-To: kend@umbc3.UMD.EDU (Ken Dahl) Organization: University of Maryland, Baltimore County Lines: 19 As Erland Sommarskog pointed out, the %descr that I suggested won't work when declaring a Pascal function that is not external. I tried some testing with different attributes in Pascal and successfully passed a string to Pascal from COBOL using: Procedure PrtString(VAR code : integer; (* Cobol passes by ref *) VAR str : [class_s] packed array [l..u:integer] of char); this could easily be written as a function to do what Mr. Sommarskog needs. In addition to passing the string correctly, the lower and upper bounds of the string are passed as well (as l and u respectively in this example). -- ------------------------------------------------------------------------------ Kenneth Dahl ARPANET: kend@umbc3.umd.edu BITNET: KEND@UMBC My opinions are not necessarily those of the University of Maryland...