From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_40 autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:43cf:: with SMTP id q198mr27367087qka.689.1641063187761; Sat, 01 Jan 2022 10:53:07 -0800 (PST) X-Received: by 2002:a25:bcc3:: with SMTP id l3mr24111828ybm.148.1641063187440; Sat, 01 Jan 2022 10:53:07 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 1 Jan 2022 10:53:07 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=69.165.217.11; posting-account=cWMYQAoAAADC6Q2Ml1nyYgTWH7MBkx9I NNTP-Posting-Host: 69.165.217.11 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Accessing Addresses in a Passed String From: Pat Van Canada Injection-Date: Sat, 01 Jan 2022 18:53:07 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63319 List-Id: Hi Everyone. Happy New Year! I am stuck with a problem. I have an application were I must use pointers, despite the fact that I try to avoid them. in the declarative section, I can write: str2 : aliased string( 1 .. 4 ) ; and then I could potentially access the address of each character in the string. However, I cannot use "aliased" in an argument list and worse yet, since it is effectively a character array, it will be passed by pointer. Here is a little snippet of what I am trying to do: procedure double_draw ( row : in integer ; column : in integer ; word : in out string ) is begin for j in column .. word'length loop input_pad(row,j).ch_ptr := word(j)'access ; This is not going to work, does anyone have a suggestion of how I might work around this? My only solution right now is to move this to the calling code and simply pass the address of each character of a string Thanks for reading-Pat