Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #27848 > unrolled thread
| Started by | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| First post | 2012-10-30 17:41 -0500 |
| Last post | 2012-10-31 20:04 -0500 |
| Articles | 20 on this page of 85 — 18 participants |
Back to article view | Back to comp.lang.c
kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 17:41 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 14:48 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 17:50 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 14:56 -0700
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 15:01 -0700
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:07 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:12 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:15 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:25 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:27 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:59 -0500
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:29 -0800
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 15:30 -0700
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:36 -0700
Re: kandr2 question Kenneth Brody <kenbrody@spamcop.net> - 2012-10-31 14:15 -0400
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:04 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:07 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:09 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:13 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:30 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:50 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 19:28 -0500
Re: kandr2 question Lew Pitcher <lpitcher@teksavvy.com> - 2012-10-30 19:39 -0400
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 19:50 -0500
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:45 -0800
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:43 -0800
Re: kandr2 question Kenneth Brody <kenbrody@spamcop.net> - 2012-10-31 14:21 -0400
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:43 -0800
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:40 -0800
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 15:31 -0700
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:36 -0700
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:37 -0800
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:07 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:10 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:47 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:52 -0700
Re: kandr2 question "BartC" <bc@freeuk.com> - 2012-10-30 22:08 +0000
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:11 -0700
Re: kandr2 question James Kuyper <jameskuyper@verizon.net> - 2012-10-30 18:36 -0400
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:44 -0500
Re: kandr2 question tom st denis <tom@iahu.ca> - 2012-10-30 15:53 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 19:06 -0500
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 19:12 -0500
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:49 -0800
Re: kandr2 question Old Wolf <oldwolf@inspire.net.nz> - 2012-11-11 14:37 -0800
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:27 -0800
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 15:00 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 18:18 -0500
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 16:13 -0700
Re: kandr2 question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-30 23:31 +0000
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 17:45 -0700
Re: kandr2 question Anand Hariharan <mailto.anand.hariharan@gmail.com> - 2012-10-31 05:43 -0700
Re: kandr2 question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-31 13:33 +0000
Re: kandr2 question James Kuyper <jameskuyper@verizon.net> - 2012-10-31 10:27 -0400
Re: kandr2 question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-31 16:11 +0000
Re: kandr2 question Anand Hariharan <mailto.anand.hariharan@gmail.com> - 2012-11-07 14:53 -0800
Re: kandr2 question James Kuyper <jameskuyper@verizon.net> - 2012-10-31 10:38 -0400
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-30 19:39 -0500
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-30 17:51 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 13:47 -0500
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:55 -0800
Re: kandr2 question Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-10-31 19:48 +0200
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 06:52 -0800
Re: kandr2 question hormelfree@gmail.com - 2012-11-10 11:23 -0800
Re: kandr2 question "BartC" <bc@freeuk.com> - 2012-10-31 01:56 +0000
Re: kandr2 question "christian.bau" <christian.bau@cbau.wanadoo.co.uk> - 2012-10-30 18:44 -0700
Re: kandr2 question Barry Schwarz <schwarz45@yahoo.com> - 2012-10-30 20:32 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 13:52 -0500
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-31 11:20 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 14:37 -0500
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 14:40 -0500
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-31 12:18 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 15:29 -0500
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 16:56 -0500
Re: kandr2 question Keith Thompson <kst-u@mib.org> - 2012-10-31 15:05 -0700
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-01 13:11 -0500
Re: kandr2 question Barry Schwarz <schwarz45@yahoo.com> - 2012-10-31 21:44 -0700
Re: kandr2 question Ike Naar <ike@sverige.freeshell.org> - 2012-11-01 09:34 +0000
Re: kandr2 question Barry Schwarz <schwarzb@dqel.com> - 2012-11-01 12:13 -0700
Re: kandr2 question Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-10 07:04 -0800
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-01 15:26 -0500
Re: kandr2 question Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-11-01 17:56 +0200
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-01 13:14 -0500
Re: kandr2 question SG <sgesemann@gmail.invalid> - 2012-10-31 20:14 +0100
Re: kandr2 question "Bill Cunningham" <nospam@nspam.invalid> - 2012-10-31 20:04 -0500
Page 1 of 5 [1] 2 3 4 5 Next page →
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 17:41 -0500 |
| Subject | kandr2 question |
| Message-ID | <k6phhi$kuq$1@dont-email.me> |
§1.9 page 29 has this function. int getline (char s[], int lim) Unless I'm missing something here to pass an array shoudn't that first parameter be char *s ? Bill
[toc] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 14:48 -0700 |
| Message-ID | <d557e541-7b40-4174-9b06-93fc0d18bad4@m4g2000yqf.googlegroups.com> |
| In reply to | #27848 |
On Oct 30, 5:41 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > §1.9 page 29 has this function. > > int getline (char s[], int lim) > > Unless I'm missing something here to pass an array shoudn't that first > parameter be char *s ? > > Bill Fuck off.
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 17:50 -0500 |
| Message-ID | <k6pi2j$o94$1@dont-email.me> |
| In reply to | #27850 |
tom st denis wrote:
> Fuck off.
Go fuck yourself. That's what I have been told.
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 14:56 -0700 |
| Message-ID | <3f556c91-92ab-4d83-96d2-7d7952a356ee@s18g2000yqh.googlegroups.com> |
| In reply to | #27851 |
On Oct 30, 5:50 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > tom st denis wrote: > > Fuck off. > > Go fuck yourself. That's what I have been told. If you don't know that char s[] is equivalent to char *s by now you have to be trolling and are deserving of contempt. And frankly I don't get you. Trolling comp.lang.c? Do you know how specific that is? Of the few 100,000 people on the planet who are aware of C you have to be one of the trolls? Seriously? Get a hobby.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-10-30 15:01 -0700 |
| Message-ID | <lnmwz3r54t.fsf@nuthaus.mib.org> |
| In reply to | #27852 |
tom st denis <tom@iahu.ca> writes:
[...]
> ... char s[] is equivalent to char *s ...
As you know, the equivalence applies only for function parameters.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 15:07 -0700 |
| Message-ID | <1e08af9e-f6b7-420e-b5ec-8e1152c90646@o8g2000yqh.googlegroups.com> |
| In reply to | #27854 |
On Oct 30, 6:01 pm, Keith Thompson <ks...@mib.org> wrote: > tom st denis <t...@iahu.ca> writes: > [...] > > > ... char s[] is equivalent to char *s ... > > As you know, the equivalence applies only for function parameters. Yup, but I was replying in context to his original question so the pedantic police need not apply. Tom
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 18:12 -0500 |
| Message-ID | <k6pjcp$16g$1@dont-email.me> |
| In reply to | #27858 |
tom st denis wrote:
> Yup, but I was replying in context to his original question so the
> pedantic police need not apply.
You Obviously didn't understand the original question in you infinite
mind. Dick.
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 15:15 -0700 |
| Message-ID | <efc6989d-fb20-4751-984f-6f1ad9830521@q16g2000yqc.googlegroups.com> |
| In reply to | #27863 |
On Oct 30, 6:12 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > tom st denis wrote: > > Yup, but I was replying in context to his original question so the > > pedantic police need not apply. > > You Obviously didn't understand the original question in you infinite > mind. Dick. You asked if a char s[] inside a parameter list should instead be char *s. The answer is no. It doesn't have to be. You only wrote one question in your original post. Unless you have some sort of vanishing NNTP ink that I don't know of I think saw and answered your original question. Tom
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 18:25 -0500 |
| Message-ID | <k6pk40$5m0$1@dont-email.me> |
| In reply to | #27865 |
tom st denis wrote: > On Oct 30, 6:12 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: >> tom st denis wrote: >>> Yup, but I was replying in context to his original question so the >>> pedantic police need not apply. >> >> You Obviously didn't understand the original question in you infinite >> mind. Dick. > > You asked if a char s[] inside a parameter list should instead be char > *s. > > The answer is no. It doesn't have to be. [snip] I have never seen good function prototypes except these examples declare an array definition as char s[] in the prototype. Are you looking at a babie's code? They must be writing like this is kandr2 to simplify things.
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 15:27 -0700 |
| Message-ID | <13242459-6ed7-4e8b-9768-e7936aa89a38@c16g2000yqe.googlegroups.com> |
| In reply to | #27867 |
On Oct 30, 6:25 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > tom st denis wrote: > > On Oct 30, 6:12 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > >> tom st denis wrote: > >>> Yup, but I was replying in context to his original question so the > >>> pedantic police need not apply. > > >> You Obviously didn't understand the original question in you infinite > >> mind. Dick. > > > You asked if a char s[] inside a parameter list should instead be char > > *s. > > > The answer is no. It doesn't have to be. > > [snip] > > I have never seen good function prototypes except these examples declare an > array definition as char s[] in the prototype. Are you looking at a babie's > code? They must be writing like this is kandr2 to simplify things. I've seen it before, like I said I too don't use it, but it's valid C code [even in C11] so the answer [again] to your original question is no, it doesn't HAVE to be "char *s" in the parameter list. Tom
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 18:59 -0500 |
| Message-ID | <k6pm55$h8h$1@dont-email.me> |
| In reply to | #27868 |
tom st denis wrote:
> I've seen it before, like I said I too don't use it, but it's valid C
> code [even in C11] so the answer [again] to your original question is
> no, it doesn't HAVE to be "char *s" in the parameter list.
My original question,
Unless I'm missing something here to pass an array shoudn't that first
parameter be char *s ?
Should've been,
Unless I'm missing something here to pass an array shoudn't that first
parameter be char *s [by convention]?
And I was attacked for not understanding they were the same. What the
fuck? Mind reading is off alittle today isn't it? So you could slip that
troll word in there and look better. Well then *don't* feed the trolls.
[toc] | [prev] | [next] | [standalone]
| From | Nick Keighley <nick_keighley_nospam@hotmail.com> |
|---|---|
| Date | 2012-11-10 06:29 -0800 |
| Message-ID | <7cb6271d-d7f1-4a18-ab38-e1278fa8a55b@10g2000vbu.googlegroups.com> |
| In reply to | #27867 |
On Oct 30, 10:25 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > tom st denis wrote: > > On Oct 30, 6:12 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > >> tom st denis wrote: > >>> Yup, but I was replying in context to his original question so the > >>> pedantic police need not apply. > > >> You Obviously didn't understand the original question in you infinite > >> mind. Dick. > > > You asked if a char s[] inside a parameter list should instead be char > > *s. > > > The answer is no. It doesn't have to be. > > I have never seen good function prototypes except these examples declare an > array definition as char s[] in the prototype. Are you looking at a babie's > code? They must be writing like this is kandr2 to simplify things. I'm no baby and I often use array syntax
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-10-30 15:30 -0700 |
| Message-ID | <lnip9rr3tf.fsf@nuthaus.mib.org> |
| In reply to | #27858 |
tom st denis <tom@iahu.ca> writes:
> On Oct 30, 6:01 pm, Keith Thompson <ks...@mib.org> wrote:
>> tom st denis <t...@iahu.ca> writes:
>> [...]
>>
>> > ... char s[] is equivalent to char *s ...
>>
>> As you know, the equivalence applies only for function parameters.
>
> Yup, but I was replying in context to his original question so the
> pedantic police need not apply.
Nevertheless, I was concerned that other readers might not pay
sufficient attention to the context.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 15:36 -0700 |
| Message-ID | <7924df1a-8f2c-47ba-ad86-f96f9369cfe6@c17g2000yqe.googlegroups.com> |
| In reply to | #27870 |
On Oct 30, 6:30 pm, Keith Thompson <ks...@mib.org> wrote: > tom st denis <t...@iahu.ca> writes: > > > On Oct 30, 6:01 pm, Keith Thompson <ks...@mib.org> wrote: > >> tom st denis <t...@iahu.ca> writes: > >> [...] > > >> > ... char s[] is equivalent to char *s ... > > >> As you know, the equivalence applies only for function parameters. > > > Yup, but I was replying in context to his original question so the > > pedantic police need not apply. > > Nevertheless, I was concerned that other readers might not pay > sufficient attention to the context. Fair enough. Tom
[toc] | [prev] | [next] | [standalone]
| From | Kenneth Brody <kenbrody@spamcop.net> |
|---|---|
| Date | 2012-10-31 14:15 -0400 |
| Message-ID | <Tsmdne7l7L5Z9wzNnZ2dnUVZ_sydnZ2d@bestweb.net> |
| In reply to | #27858 |
On 10/30/2012 6:07 PM, tom st denis wrote: > On Oct 30, 6:01 pm, Keith Thompson <ks...@mib.org> wrote: >> tom st denis <t...@iahu.ca> writes: >> [...] >> >>> ... char s[] is equivalent to char *s ... >> >> As you know, the equivalence applies only for function parameters. > > Yup, but I was replying in context to his original question so the > pedantic police need not apply. Since I'm not a member of the "pedantic police", I guess I am allowed to point out that you stripped out the context showing that it was a function parameter. You simply said: > If you don't know that char s[] is equivalent to char *s by now you > have to be trolling and are deserving of contempt. -- Kenneth Brody
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 18:04 -0500 |
| Message-ID | <k6piss$too$1@dont-email.me> |
| In reply to | #27852 |
tom st denis wrote:
> If you don't know that char s[] is equivalent to char *s by now you
> have to be trolling and are deserving of contempt.
Of course I know that Dick. What's that got to do with anything? Read
the standard.
> And frankly I don't get you. Trolling comp.lang.c? Do you know how
> specific that is? Of the few 100,000 people on the planet who are
> aware of C you have to be one of the trolls? Seriously? Get a hobby.
You're the one dropping a troll.
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 15:07 -0700 |
| Message-ID | <2aaf446b-f340-4fd8-aee2-9b9930284d5d@q16g2000yqc.googlegroups.com> |
| In reply to | #27855 |
On Oct 30, 6:04 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > tom st denis wrote: > > If you don't know that char s[] is equivalent to char *s by now you > > have to be trolling and are deserving of contempt. > > Of course I know that Dick. What's that got to do with anything? Read > the standard. And you wrote... >int getline (char s[], int lim) > >Unless I'm missing something here to pass an array shoudn't that first >parameter be char *s ? And I wrote "they're equivalent." So maybe yes it should be char *s out of convention but char s[] is allowed there as for function parameters they're equivalent. And since clearly you seem to know this [judging by your reply here] why the fuck are you asking? Tom
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 18:09 -0500 |
| Message-ID | <k6pj6m$vmv$1@dont-email.me> |
| In reply to | #27856 |
tom st denis wrote: > And since clearly you seem to know this [judging by your reply here] > why the fuck are you asking? None of your God Damn Business and *I* was right. But that's not my point.
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-10-30 15:13 -0700 |
| Message-ID | <e37c6d40-31ad-4f75-9566-aab88f3e3db2@c16g2000yqe.googlegroups.com> |
| In reply to | #27860 |
On Oct 30, 6:09 pm, "Bill Cunningham" <nos...@nspam.invalid> wrote: > tom st denis wrote: > > And since clearly you seem to know this [judging by your reply here] > > why the fuck are you asking? > > None of your God Damn Business and *I* was right. But that's not my point. Right about what? It doesn't have to be "char *s" it CAN be "char s[]" and be perfectly valid code [when used as a parameter to a function]. It's convention to use the star but that's not mandatory. Just like you could write char a[4]; a[3] = 4; Or 3[a] = 4; They're equivalent C code. Most people would use the former instead of the latter even though they have the same effect. Tom
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2012-10-30 18:30 -0500 |
| Message-ID | <k6pkdc$7em$1@dont-email.me> |
| In reply to | #27864 |
tom st denis wrote: > It's convention to use the star but that's not mandatory. Just like > you could write > > char a[4]; > > a[3] = 4; > > Or > > 3[a] = 4; > > They're equivalent C code. Most people would use the former instead > of the latter even though they have the same effect. > > Tom In my original question I was asking about convention.
[toc] | [prev] | [next] | [standalone]
Page 1 of 5 [1] 2 3 4 5 Next page →
Back to top | Article view | comp.lang.c
csiph-web