why array can't be assigned, like structs?
Mar 8 '07
57 3182
Richard Heathfield wrote:
Default User said:
Richard Heathfield wrote:
Default User said:
Richard Heathfield wrote:
Default User said:
<http://groups.google.com/support/bin/topic.py?topic=9246>
What would Google know about newsgroups?
He's a Google user, he ought to be at least familiar with their
help section.
Yeah. What he might not realise from reading Google's help pages is
that newsgroups are not a Google product, but a well-established
on-line society to which Google has attached itself like a remora.
Did you actually READ the link I provided?
Yes, actually. Hence "might not" rather than "will not".
There is no document that can't be misinterpreted by a sufficiently
stupid reader. The one I pointed to was clear enough in my mind for the
designated purpose.
Brian
Mark McIntyre <ma**********@spamcop.netwrites:
On 10 Mar 2007 08:10:53 -0800, in comp.lang.c , "Harald van D?k"
<tr*****@gmail.comwrote:
>>You snipped too much. You claimed that an array isn't a type, and that that is the reason it has to be different.
You apparently mentally snipped too much, for the distinction I was
drawing was between a simple and derived type.
That distinction is irrelevant in this case.
You claimed that array types are not types. You were wrong.
>>And I showed that you /can/ assign to a struct using that same method.
So what? As I've said ad nauseam, you can't prove it by example, only
disprove by counterexample.
Fine, forget about examples and counterexamples.
int is a non-derived type. The language supports assignment for type int.
void is a non-derived type. The language does not support assignment
for type void.
A structure type is a derived type. The language supports assignment
for structure types.
An array type is a derived type. The language does not support
assignment for array types.
Conclusion: The fact that assignment is not supported for array types
has nothing to do with the fact that array types are derived types.
You claimed that there was a relationship. You were incorrect.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mark McIntyre <ma**********@spamcop.netwrites:
On Fri, 09 Mar 2007 17:04:54 -0800, in comp.lang.c , Keith Thompson
<ks***@mib.orgwrote:
>>Mark, you could save us all a great deal of time and trouble if, every now and then, you'd just admit when you've made a mistake.
I would, if I thought I had. I don't think I have.
Is an array type a type? You said upthread that it isn't.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mark McIntyre <ma**********@spamcop.netwrites:
On Fri, 09 Mar 2007 17:05:49 -0800, in comp.lang.c , Keith Thompson
<ks***@mib.orgwrote:
>>Mark McIntyre <ma**********@spamcop.netwrites:
>>On Thu, 08 Mar 2007 17:31:40 -0800, in comp.lang.c , Keith Thompson <ks***@mib.orgwrote:
Yes, it would have been clearer. It would also have been correct, which your original statement quite simply was not.
My original statement was absolutely correct, An array is a derived
type.
One of your original statements was that an array is a derived type.
That's absolutely correct, and nobody has claimed otherwise.
Another of your original statements was that an array is not a type.
That's wrong; an array is a type.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mark McIntyre wrote:
On 10 Mar 2007 08:10:53 -0800, in comp.lang.c , "Harald van D?k"
<tr*****@gmail.comwrote:
You snipped too much. You claimed that an array isn't a type, and that
that is the reason it has to be different.
You apparently mentally snipped too much, for the distinction I was
drawing was between a simple and derived type.
You're probably confusing me with some others in this thread. I
treated "isn't a type" as "isn't a simple type" in my replies. Please
re-read my message.
And I showed that you /can/ assign to a struct using that same method.
So what? As I've said ad nauseam, you can't prove it by example, only
disprove by counterexample.
It disproved your claim that you cannot assign to a struct using that
same method.
What you probably meant, is that I cannot prove that it applies to /
all/ structure types using just an example. If that's not what you
meant, you're wrong.
Default User said:
<snip>
There is no document that can't be misinterpreted by a sufficiently
stupid reader. The one I pointed to was clear enough in my mind for
the designated purpose.
Ah, but then you are not a sufficiently stupid reader!
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at the above domain, - www.
Ben Pfaff wrote:
>
.... snip ...
--
"...Almost makes you wonder why Heisenberg didn't include postinc/dec
operators in the uncertainty principle. Which of course makes the
above equivalent to Schrodinger's pointer..."
--Anthony McDonald
Didn't Schroedinger kept a sealpoint cat, rather than a dog. :-)
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
--
Posted via a free Usenet account from http://www.teranews.com
Richard Heathfield wrote:
Default User said:
<snip>
There is no document that can't be misinterpreted by a sufficiently
stupid reader. The one I pointed to was clear enough in my mind for
the designated purpose.
Ah, but then you are not a sufficiently stupid reader!
The point was that the information I provided, even though it came from
Google, was pretty decent for a brief overview.
Brian This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brian |
last post by:
I'm diddlying with a script, and found some behavior I don't understand.
Take this snippet:
for ($i = 0; $i <= count($m); $i++) {
array_shift($m);
reset($m);
}
|
by: Stormkid |
last post by:
Hi Group I'm trying to figure out a way that I can take two (two
dimensional) arrays and avShed and shed, and subtract the matching elements
in shed from avShed I've pasted the arrays blow from a...
|
by: lawrence |
last post by:
I wanted to test xml_parse_into_struct() so I took the example off of
www.php.net and put this code up on a site:
<?php
$simple = <<<END
<item>
|
by: vcardillo |
last post by:
Hello all,
Okay, I am having some troubles. What I am doing here is dealing with
an employee hierarchy that is stored in an array. It looks like this:
$employees = array( "user_id" => array(...
|
by: Sam Collett |
last post by:
How do I remove an item with a specified value from an array?
i.e. array values 1,2,2,5,7,12,15,21
remove 2 from array would return
1,5,7,12,15,21
(12 and 21 are NOT removed, duplicates are...
|
by: Mike S. Nowostawsky |
last post by:
I tried using the "toUpperCase()" property to change the value of an array
entity to uppercase BUT it tells me that the property is invalid. It seems
that an array is not considered an object when...
|
by: jr |
last post by:
Sorry for this very dumb question, but I've clearly got a long way to go!
Can someone please help me pass an array into a function. Here's a starting
point.
void TheMainFunc()
{
// Body of...
|
by: Leszek |
last post by:
Hi.
Is it possible in javascript to operate on an array without knowing how mamy
elements it has?
What i want to do is sending an array to a script, and this script should
add all values from...
|
by: Jim Carlock |
last post by:
Looking for suggestions on how to handle bad words that might
get passed in through $_GET variables.
My first thoughts included using str_replace() to strip out such
content, but then one ends...
|
by: =?Utf-8?B?U2hhcm9u?= |
last post by:
Hi Gurus,
I need to transfer a jagged array of byte by reference to unmanaged
function, The unmanaged code should changed the values of the array, and when
the unmanaged function returns I need...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |