[progress Communities] [progress Openedge Abl] Forum Post: Re: Determining Signature For A .p ?

  • Thread starter Thread starter cverbiest
  • Start date Start date
Status
Not open for further replies.
C

cverbiest

Guest
quickly concocted something from a test I had for /* test.p */ define input parameter inputChar as char. define output parameter outputChar as char. define input-output parameter inputoutputChar as char. define input parameter inputInt as int. define output parameter outputInt as int. define input-output parameter inputoutputInt as int. it shows MAIN test.p 1,,1 inputChar 1 0,2 outputChar 1 0,3 inputoutputChar 1 0,1 inputInt 4 0,2 outputInt 4 0,3 inputoutputInt 4 0 def stream sdir. def stream rcode. def var shortname as char no-undo. def var fullname as char no-undo. def var filepos as int no-undo. /* should be local to rcode-sourcename, placed here for debugging reasons */ function rcode-sourcename returns char (input fullname as char, input ifullsignature as log): def var mptr as memptr no-undo. def var wz-signature as char no-undo form "x(50)". def var sourcename as char no-undo init ?. set-size(mptr) = 500. input stream rcode from value(fullname) binary no-convert. import stream rcode mptr. input stream rcode close. do filepos = 1 to 496 while get-string(mptr, filepos, 4) <> "MAIN": end. wz-signature = get-string(mptr, filepos). sourcename = entry(1, entry(2, wz-signature, " ")). set-size(mptr) = 0. if ifullsignature then return wz-signature. return sourcename. end function. compile test.p save. message rcode-sourcename("test.r", yes).

Continue reading...
 
Status
Not open for further replies.
Back
Top