Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8320973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:51:19+00:00 2026-06-08T22:51:19+00:00

Okay I am learning about arrays and how to work with them like I

  • 0

Okay I am learning about arrays and how to work with them like I used to…… (Used to do alot of scripting but now am trying to learn to develop ipad and iphone app’s

But my issue is I have it where it pulls a bunch of data from yahoo finance with a for loop..

But now my issue is how can I work with just one peice of the array data that has been pulled

here is my example

-(IBAction) clicked:(id)sender {

   NSString * StockOneYahooFinance = [NSString stringWithFormat:@"http://finance.yahoo.com/q/hp?s=S+Historical+Prices"];
   NSString * PulledStockOne = [NSString stringWithContentsOfURL:[NSURL URLWithString:StockOneYahooFinance] encoding:1 error:nil];

   for (i=1;i<=10;i++){

      NSString *StartPulling = [[PulledStockOne componentsSeparatedByString:@"nowrap align="] objectAtIndex:i];

      NSString *StartOpen = [[StartPulling componentsSeparatedByString:@">"] objectAtIndex:3];
      NSString *Open = [[StartOpen componentsSeparatedByString:@"<"] objectAtIndex:0];

      NSString *StartClose = [[StartPulling componentsSeparatedByString:@">"] objectAtIndex:9];
      NSString *Close = [[StartClose componentsSeparatedByString:@"<"] objectAtIndex:0];

      NSMutableArray *StockOpens = [[NSMutableArray alloc] initWithCapacity:6];
      [StockOpens addObject:Open];


      sixtyday.text = [OpenValues objectAtIndex:10];
      nintyday.text = [CloseValues objectAtIndex:10];


      if ([OpenValues objectAtIndex:10]=[OpenValues objectAtIndex:11] {
         sevenday.text = @"Plus One";
      } 
   }
}

But now I want to do something like

year.text=StockOpens[5];

How can I do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:51:20+00:00Added an answer on June 8, 2026 at 10:51 pm

    Starting in Xcode 4.4 (LLVM 4.0), literals can be used for C-style subscripting in Objective-C.

    year.text = StockOpens[5];
    

    LLVM has documented the use of literal here: Objective-C Literals

    Note: Because Clang will translate the literal usage, in this case to objectAtIndexedSubscript:, the OS X v10.8 (or iOS 6) Foundation framework is required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

okay i have been trying to understand this for hours i am learning VB
Newbie still learning, been trying to search and hack code together for hours now,
Okay so i'm learning html right now and soon css. In my html coding
Okay so I'm learning about uploads and need to copy the tmp file to
Now that I am learning more about design time aspects of component development, I
I'm learning C right now and got a bit confused with character arrays -
Okay, so I'm just learning about templates. Anyways, I'm probably (most definitely) doing something
I'm learning about puppet and trying to experiment with it on a VM at
Okay at the moment I my self am new to programming and learning it
Okay so I have started a new language in class. We are learning Scheme

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.