Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Never trust an operating system you don't have sources for. ;-) -- Unknown source


devel / comp.lang.ada / Re: Printing the address

SubjectAuthor
o Re: Printing the addressNiklas Holsti

1
Re: Printing the address

<ifvcbdFckevU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5179&group=comp.lang.ada#5179

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Printing the address
Date: Tue, 11 May 2021 15:41:16 +0300
Organization: Tidorum Ltd
Lines: 51
Message-ID: <ifvcbdFckevU1@mid.individual.net>
References: <609a5eaf$0$20558$e4fe514c@news.kpn.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 3SaZopu9Va0wD5DsNqmqpwi2+/nz3V6hNP8IsfHI81k8rxoBEP
Cancel-Lock: sha1:S0nmReX/FI8z/YLX85x20zeaZZk=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.7.0
In-Reply-To: <609a5eaf$0$20558$e4fe514c@news.kpn.nl>
Content-Language: en-US
 by: Niklas Holsti - Tue, 11 May 2021 12:41 UTC

On 2021-05-11 13:38, ldries46 wrote:
> I Get an contstraint error in the line:
> /if Boxes(n).Status = manual or Boxes(n).Status = auto then/

That is either becase "n" is not in Boxes'Range, or because Boxes(n) is
null. From the rest of your message, it seems you believe that the
latter is the cause.

(Btw, a briefer expression is

if Boxes(n).Status in manual | auto then ...

assuming that Box_Status is a discrete type.)

> where/:
>    Boxes     : Ar_Box;
>    type Box is record
>       Status  : Box_Status;
>       Nrs_pos : Ar_Pos;
>       x_val   : integer;
>       y_val   : integer;
>       Fill    : integer;
>    end record;
> ///   type Box_Acces is access all Box;
> /   type Ar_Box is array (1 .. Max_Num) of Box_Acces;
>
> /To debug the program I need to finf where the constraint is
> possible a 0x0 somewhere in Box

I assume you mean that some element of Boxes is a null access. That may
or may not be represented as 16#0#.

> How can I priint this value I tried converting it to and integer but I
> couldn'd get that working

You don't have to print the value. All that should matter to you is
whether the value is null or not, so:

Put (if Boxes(n) = null then "null" else "not null");

(If you really want to print the address, do

System.Storage_Elements.Integer_Address'Image (
System.Storage_Elements.To_Integer (Boxes(n).all'Address))

but be sure to check for a null value of Boxes(n) first.)

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor