Welcome, Guest. Please login or register.

Author Topic: Learning C with the Amiga  (Read 32400 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Steady

Re: Learning C with the Amiga
« on: January 25, 2007, 01:23:39 PM »
I agree with Crumb.

Cubic IDE is the way to go, but it is still good to get the Developer CD 2.1 because it has the Amiga Rom Kernal Manuals in AmigaGuide format. They are OK for referencing, but if you can, you should try and at least get the actual Libraries RKM book. Although it is hard to find and the same content is on the CD, it is easier to work through the actual book. At least, that's what I found.

Good luck.
 

Offline Steady

Re: Learning C with the Amiga
« Reply #1 on: January 26, 2007, 01:25:07 PM »
The last definition is the most 'correct' one because when your program starts, the main() function will receive a pointer to all the arguments on the command line in argv as an array. argn contains the number of arguments that were supplied (including the name of the command).

For example, if you were to type the following at the Shell prompt (not including the quotes):

'dir ram: all'

the main() function arguments would contain the following:

argn = 3

argv[0] = "dir"
argv[1] = "ram:"
argv[2] = "all"

You can think of the array as a list of the words on the command line that can be read separately by counting from left to right. Counting starts at 0.

Also, traditionally argn tends to be called argc, but it doesn't really matter. It's just a name.

Hope that helps.
 

Offline Steady

Re: Learning C with the Amiga
« Reply #2 on: February 22, 2007, 05:14:43 PM »
@Koaftder

Is that because her Tourettes was making her say yes all the time when she never was interested, forcing her to use email to actually say no? ;-)