why array can't be assigned, like structs?
Mar 8 '07
57 3262
Richard Heathfield wrote:
Default User said:
Richard Heathfield wrote:
Default User said:
Richard Heathfield wrote:
Default User said:
<http://groups.google.c om/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**********@s pamcop.netwrite s:
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_Keit h) 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**********@s pamcop.netwrite s:
On Fri, 09 Mar 2007 17:04:54 -0800, in comp.lang.c , Keith Thompson
<ks***@mib.orgw rote:
>>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_Keit h) 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**********@s pamcop.netwrite s:
On Fri, 09 Mar 2007 17:05:49 -0800, in comp.lang.c , Keith Thompson
<ks***@mib.orgw rote:
>>Mark McIntyre <ma**********@s pamcop.netwrite s:
>>On Thu, 08 Mar 2007 17:31:40 -0800, in comp.lang.c , Keith Thompson <ks***@mib.or gwrote:
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_Keit h) 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.securityfoc us.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 print_r cmd any
suggestions would be great. Thanks much Todd
//avShed array
Array ( => Array ( => 1 => 08:00 ) => Array
( => 1 => 08:05 ) => Array ( => 1
=> 08:10 ) => Array ( => 1 => 08:15 )
=> Array ( => 1 => 08:20 ) => Array...
|
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( "name", "title",
"reports to user id", "start date in the format: mm/dd/yyyy" )
);
How can I display this hierarchy in simple nested <li> tags in the most
|
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 also removed)
So far I have (val is value, ar is array, returns new array):
| |
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 it is assigned a text
literal?? HOW can I change the array value to upper case then? What other
method exists for arrays?
Ex:
var GridArrayName1 = new Array();
GridArrayName1 = new Array ('test-value');
GridArrayName1 = GridArrayName1...
|
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 code...
TCHAR myArray;
DoStuff(myArray);
|
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 that array
Could you show me a little example how to do this?
Thanks.
|
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 up looking for characters that wrap
around the stripped characters and it ends up as a recursive
ordeal that fails to identify a poorly constructed $_GET
variable (when someone hand-types the item into the line and
makes a simple typing error).
|
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 to show the array data to the end user.
Can I do that?
How?
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |