4 ms·
True, I was thinking about type conversion from String to Character, IIRC you have to use ' operator, something like my_string'first (not sure, I needed it 10 y
by agumonkey 12y ago
True, I was thinking about type conversion from String to Character, IIRC you have to use ' operator, something like my_string'first (not sure, I needed it 10 years ago), otherwise my_string(1) gives a String of length one, not the first Character.
- attackcrow 12y agoDepends on how the array is defined. Ada allows you to have any discrete type as your array indices, so to get the first element of an array, you need to use my_string(my_string'first).