Hi,

I am using GNUStep on Windows with the clang compiler.

From what I have read, I should be able to access NSArray elements with following ("universal"...) notation

myArray[index]

instead of the expanded:  [myArray objectAtIndex:1]

However, when I try the shorthand, I receive an error message from the compiler:

e.g.

    NSArray * myArray = @[@"A", @"B", @"C"];
    NSLog(myArray[1]);

error:
 passing 'NSArray' to parameter of incompatible type 'id'

Is there something special I need to do to enable this notation? (compile flag?) (Is it a problem on Windows?)

Thanks
Rael

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
  • How to ena... Rael Bauer
    • Re: H... David Chisnall
      • R... Rael Bauer
        • ... David Chisnall
          • ... Lars Sonchocky-Helldorf
            • ... David Chisnall
              • ... Dr Slivnik Tomaž MA (Cantab) MMath (Cantab) PhD (Cantab) FTICA
        • ... Dr. H. Nikolaus Schaller
          • ... Rael Bauer

Reply via email to