我的問題很簡單,就像谷歌讓我失望一樣。如何將無界的字符串轉換爲整數? 如果字符串是有界的,我可以這樣做:I : Integer := Integer'Value("613"); 然而,我的字符串是無界的,和Ada引發此錯誤: expected type "Standard.String" found private type "Ada.Strings.Unbounded.Unbounded_Str
我有一個通用的包裝Containers.Stacks看起來大致是 generic
type Value_Type is private;
package Containers.Stacks with Preelaborate is
--Node stuff
type Stack is new Container with private;
--Oth
我們最近更新了GCC版本(4.8.2至5.3.0),並在某些Ada應用程序中開始接收意外的約束錯誤。我已經將它歸納爲以下: -- moo.adb
with text_io;
procedure moo is
type thing_type is (something1,something2,something3,something4,something5,something6);
我在ADA定義的矩陣型是這樣的: type Matrix_Type is array(Natural range <>, Natural range <>) of Item_Type; 爲了一些轉換應用到輸入矩陣 ,我需要一個函數來定義一個矩陣切片。 我想,通過這樣做以下方式 procedure Do_Stuff(M: Matrix_Type) is
-- c needs to be h
讓下面的Ada類型定義: type Type_Huge is array (1 .. Integer'Last) of Float;
type Type_B is (foo, bar, blop, bloub);
type Type_A (disc : Type_B := foo) is
record
case disc is
when foo =>
因此,這是一個簡單的項目,我之前將它們放在一起進行測試,然後再做一些很酷的事情。最終的目標是讓程序能夠通過真棒dll功夫來處理模塊化。 但是,寶貝的步驟。現在我只想製作鏈接。 這裏我有Adder.ads: package Adder is
function Add(A : Integer; B : Integer) return Integer;
end Adder;
和各自A