How many sketches?

I am very new at this, and quite possibly missed it when reading over the Arduino. But I just recently got my first Arduino and am curious, how many sketches can it hold/function at a time?

Additionally, if it does store more than one at any given time, is there any way to essentially format/erase those stored sketches?

Thank you.

One sketch at a time.

Great. Thank you for the information.

AWOL:
One sketch at a time.

Well - for the standard setup this is true, but couldn't you create a bootloader (for instance) that would allow you to dump multiple sketches into the various 512 byte blocks/segments, and it could (in some manner) allow you to pick which segment to start executing at (then at the end of the code, it could reset the ATMega or jump back to the bootloader code)?

It just seems like this should be feasible - I mean technically, there are two "sketches" on the Arduino when it is running - the running sketch (bytes 512 -> end) and the bootloader (bytes 0 -> ~< 512); it just seems like you should be able to expand upon this, and load up a few different "chunks" or "segments" (512 byte blocks) with code, and tell the ATMega where to start executing from. Provided each piece of code didn't try to jump and run another's code (though in theory this could also be done?).

Granted, again it would require a special bootloader, and it would also require a bit more knowledge of how the ATMega worked beyond what the Arduino teaches. I suggested something like this to a poster on the forums here who was asking about running code from an SD card. I'm not sure if I misled him or not...

I'm not sure if I misled him or not...

The OP has got two posts, and had to ask the question - what do you think?

AWOL:

I'm not sure if I misled him or not...

The OP has got two posts, and had to ask the question - what do you think?

I was actually referring to the other thread I posted on...

I am not sure about this but some arduinos like the arduino duemilanove have a switch so you can have two different progams if you would like to get it.

Hope it helped,
RockyRicky

@RockyRicky:
I have a Duemilanove and I've never noticed a switch on it which allows "two different programs" - I also have a couple of Nanos and they don't seem to have this switch either. Perhaps you could provide a reference?

Pete