[BACK]Return to generic_vectors_io.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Matrices

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Matrices/generic_vectors_io.adb, Revision 1.1

1.1     ! maekawa     1: package body Generic_Vectors_io is
        !             2:
        !             3:   use Ring_io;
        !             4:
        !             5:   procedure get ( v : in out Vector ) is
        !             6:   begin
        !             7:     get(Standard_Input,v);
        !             8:   end get;
        !             9:
        !            10:   procedure get ( file : in file_type; v : in out Vector ) is
        !            11:   begin
        !            12:     for i in v'range loop
        !            13:       get(file,v(i));
        !            14:     end loop;
        !            15:   end get;
        !            16:
        !            17:   procedure get ( n : in natural; v : out Link_to_Vector ) is
        !            18:   begin
        !            19:     get(Standard_Input,n,v);
        !            20:   end get;
        !            21:
        !            22:   procedure get ( file : in file_type; n : in natural;
        !            23:                   v : out Link_to_Vector ) is
        !            24:
        !            25:     vv : Vector(1..n);
        !            26:
        !            27:   begin
        !            28:     for i in vv'range loop
        !            29:       get(file,vv(i));
        !            30:     end loop;
        !            31:     v := new Vector'(vv);
        !            32:   end get;
        !            33:
        !            34:   procedure put ( v : in Vector ) is
        !            35:   begin
        !            36:     put(Standard_Output,v);
        !            37:   end put;
        !            38:
        !            39:   procedure put ( file : in file_type; v : in Vector ) is
        !            40:   begin
        !            41:     for i in v'range loop
        !            42:       put(file,' '); put(file,v(i));
        !            43:     end loop;
        !            44:   end put;
        !            45:
        !            46:   procedure put ( v : in Link_to_Vector ) is
        !            47:   begin
        !            48:     put(Standard_Output,v);
        !            49:   end put;
        !            50:
        !            51:   procedure put ( file : in file_type; v : in Link_to_Vector ) is
        !            52:   begin
        !            53:     if v /= null
        !            54:      then put(file,v.all);
        !            55:     end if;
        !            56:   end put;
        !            57:
        !            58:   procedure put_line ( v : in Vector ) is
        !            59:   begin
        !            60:     put_line(Standard_Output,v);
        !            61:   end put_line;
        !            62:
        !            63:   procedure put_line ( file : in file_type; v : in Vector ) is
        !            64:   begin
        !            65:     for i in v'range loop
        !            66:       put(file,v(i)); new_line(file);
        !            67:     end loop;
        !            68:   end put_line;
        !            69:
        !            70:   procedure put_line ( v : in Link_to_Vector ) is
        !            71:   begin
        !            72:     put_line(Standard_Output,v);
        !            73:   end put_line;
        !            74:
        !            75:   procedure put_line ( file : in file_type; v : in Link_to_Vector ) is
        !            76:   begin
        !            77:     if v /= null
        !            78:      then put_line(file,v.all);
        !            79:     end if;
        !            80:   end put_line;
        !            81:
        !            82:   procedure put ( v : in Vector; dp : in natural ) is
        !            83:   begin
        !            84:     put(Standard_Output,v,dp);
        !            85:   end put;
        !            86:
        !            87:   procedure put ( file : in file_type; v : in Vector; dp : in natural ) is
        !            88:   begin
        !            89:     for i in v'range loop
        !            90:       put(file,' '); put(file,v(i),dp);
        !            91:     end loop;
        !            92:   end put;
        !            93:
        !            94:   procedure put ( v : in Link_to_Vector; dp : in natural ) is
        !            95:   begin
        !            96:     put(Standard_Output,v,dp);
        !            97:   end put;
        !            98:
        !            99:   procedure put ( file : in file_type;
        !           100:                   v : in Link_to_Vector; dp : in natural ) is
        !           101:   begin
        !           102:     if v /= null
        !           103:      then put(file,v.all,dp);
        !           104:     end if;
        !           105:   end put;
        !           106:
        !           107:   procedure put_line ( v : in Vector; dp : in natural ) is
        !           108:   begin
        !           109:     put_line(Standard_Output,v,dp);
        !           110:   end put_line;
        !           111:
        !           112:   procedure put_line ( file : in file_type; v : in Vector; dp : in natural ) is
        !           113:   begin
        !           114:     for i in v'range loop
        !           115:       put(file,v(i),dp); new_line(file);
        !           116:     end loop;
        !           117:   end put_line;
        !           118:
        !           119:   procedure put_line ( v : in Link_to_Vector; dp : in natural ) is
        !           120:   begin
        !           121:     put_line(Standard_Output,v,dp);
        !           122:   end put_line;
        !           123:
        !           124:   procedure put_line ( file : in file_type;
        !           125:                        v : in Link_to_Vector; dp : in natural ) is
        !           126:   begin
        !           127:     if v /= null
        !           128:      then put_line(file,v.all,dp);
        !           129:     end if;
        !           130:   end put_line;
        !           131:
        !           132: end Generic_Vectors_io;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>