Strings editAda工具包
Strings edit 是一个 Ada 语言的工具包库,提供常用的 IO操作、整数、浮点数以及罗马数字的处理。
示例代码:
package Edit_Float is new Float_Edit (Float);
use Edit_Float;
. . .
Line : String (1..512); -- A line to parse
Pointer : Integer;
Value : Float;
TabAndSpace : Ada.Strings.Maps.Character_Set :=
To_Set (" " & Ada.Characters.Latin_1.HT);
begin
. . .
Pointer := Line'First;
Get (Line, Pointer, TabAndSpace); -- Skip tabs and spaces
Get (Line, Pointer, Value); -- Get number
Get (Line, Pointer, TabAndSpace); -- Skip tabs and spaces
评论