Tokenize a string: Difference between revisions

→‎{{header|Ada}}: More proper use of 'Range and 'First
(→‎{{header|Ada}}: More proper use of 'Range and 'First)
Line 51:
procedure Parse_Commas is
Source_String : String := "Hello,How,Are,You,Today";
Index_List : array(1..256Source_String'Range) of Natural;
Next_Index : Natural := 1Index_List'First;
begin
Index_List(Next_Index) := 1Source_String'First;
while Index_List(Next_Index) < Source_String'Last loop
Next_Index := Next_Index + 1;
Anonymous user