parts := strings.Fields(s)
items := make([]int, len(parts))
for i, part := range parts {
v, err := strconv.Atoi(part)
if err != nil {
return err
}
items[i] = v
}
var
tmp: array of string;
items: array of integer;
...
tmp := s.split(whitespace, TStringsplitOptions.ExcludeEmpty);
SetLength(items, Length(tmp));
for i := Low(tmp) to High(tmp) do items[i] := StrToInt(tmp[i]);
parts := strings.Fields(s)
items := make([]int, len(parts))
for i, part := range parts {
v, err := strconv.Atoi(part)
if err != nil {
return err
}
items[i] = v
}
var
tmp: array of string;
items: array of integer;
...
tmp := s.split(whitespace, TStringsplitOptions.ExcludeEmpty);
SetLength(items, Length(tmp));
for i := Low(tmp) to High(tmp) do items[i] := StrToInt(tmp[i]);