Classic REXX, including ANSI Rexx, has only one data type - string. The result of a numeric computation is a string. The STORAGE function expects the first operand to be composed of 0-9 and A-F, and converts it from hexadecimal to binary. It were ever thus.
Yes, languages with strict typing are safer, but sometimes clumsier. REXX has a lot of expressive power when used for scripting. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Paul Gorlinsky [p...@atsmigrations.com] Sent: Monday, December 19, 2022 11:02 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Rexx function STORAGE with weird behavior on Netview Say c2x(Storage(16-6,8)) Say c2x(Storage((1+1+1+1+21-15),8)) Say c2x(Storage(10,8)) Say c2x(Storage("10",8)) So here is the problem I have, the address portion is being computed as decimal numbers and yet the storage function is treating the final result as a string of HEX numbers. Somehow this just doesn't seem to be correct with respect to expression typing and values... Does REXX on z/OS have such a loose typing of data being passed... This is how programming mistakes occur... IMHO ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN