From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Default values Date: Sun, 25 Dec 2016 09:23:14 +0000 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="3d78996eb7d0197028c6cf63de6704b0"; logging-data="4763"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1ZdsnLeZxhpxxzAL6LKZCviLpAtZk/t0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:TJRHtOIHAyUMG0JZgC7YBjQFI/0= sha1:EmVs0Vwn7+1JGyCddippZKb4Xn8= Xref: news.eternal-september.org comp.lang.ada:32961 Date: 2016-12-25T09:23:14+00:00 List-Id: Given with Ada.Real_Time; package Sbus.IMU is subtype Radians_Per_Second is Float; subtype Acceleration is Float; subtype Milligauss is Float; type Update (Magnetometer_Data_Present : Boolean := False) is record Time_Valid : Ada.Real_Time.Time; Gx, Gy, Gz : Radians_Per_Second; Ax, Ay, Az : Acceleration; case Magnetometer_Data_Present is when True => Mx, My, Mz : Milligauss; when False => null; end case; end record; protected Updater is procedure Put_New_Data (Data : Update); entry Get_New_Data (Data : out Update); procedure Get_Latest_Data (Data : out Update); private New_Data_Present : Boolean := False; Latest_Data : Update := (others => <>); end Updater; end Sbus.IMU; is the line Latest_Data : Update := (others => <>); legal? If so, what does it mean? (I've looked at the ARM for Record Aggregates, 4.3.1, and Record Types. 3.8, and am no wiser). I do realise that I need to put some default initializations in (or else supply a proper initialization for Latest_Data!)