In GNU APL, try this instead : "a"[1]
The reason this seems inconsistent is because single quote is used to define a string, i.e. an array of characters. Except the case where there is only a single character, in which case it represents a scalar character. GNU APL allows you to use double quote instead which doesn't have this inconsistency. That should make things a bit more clear, I hope. Regards, Elias On 4 Mar 2017 01:29, <enz...@gmx.com> wrote: > > i just watched a great video on apl and this was discussed i still > don't know what the harm/problem would be if instead of returning 'nothing' > > ⍴'a' why doesn't it return 1 - there is something > there please don't mention scalar i know all about it - but to me this > has always been an inconsistency in apl that made no sense to me > > ⍴'aa' the , isn't required in ⍴,'aa' to be > consistent ?? > 2 > ⍴,'a' > 1 > > > 'a'[1] > RANK ERROR > 'a'[1] > ^ ^ > 'ab'[1] > a > (,'a')[1] > a > > > > under what condition would 'a'[1] returning 'a' be a problem? > >