473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

"row major" - technically no such thing in C?

Lax

Isn't it "technically" meaningless to call C a "row major language,"
since there are no such things as multidimensional arrays in C.

In C you can define arrays of arrays, and the way that the
declarations work (first index closest to identifier defines the
largest arrays) makes it seems like C has row-major multidimensional
arrays

No need to mention "row major" when discussing C if one talks about
"arrays of arrays" and the way C's declarations work "inside to
out." Correct, no?
And thanks to Ian Collins and Walter Robinson for your help with my
previous post (on 'static' externals).

Jun 27 '08 #1
3 2160
Lax said:
>
Isn't it "technically" meaningless to call C a "row major language,"
since there are no such things as multidimensional arrays in C.
3.3.2.1 of C89: "Successive subscript operators designate a member of a
multi-dimensional array object."

6.5.2.1(3) of C99: "Successive subscript operators designate an element of
a multidimensional array object."

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jun 27 '08 #2
In article <G4*********************@bt.com>,
Richard Heathfield <rj*@see.sig.invalidwrote:
>Lax said:
>>
Isn't it "technically" meaningless to call C a "row major language,"
since there are no such things as multidimensional arrays in C.

3.3.2.1 of C89: "Successive subscript operators designate a member of a
multi-dimensional array object."

6.5.2.1(3) of C99: "Successive subscript operators designate an element of
a multidimensional array object."
Nevertheless, it has been stated many times in this newgroup (by regs,
including you; no, I'm not going to google it) that C does not have
multidimensional arrays. It has been stated many times (yes, by you
among others) that it has arrays of arrays.

Of course, you claim that it doesn't have global variables, either...

Jun 27 '08 #3
Lax wrote:
Isn't it "technically" meaningless to call C a "row major language,"
since there are no such things as multidimensional arrays in C.
C language implements the concept multidimensional arrays as arrays of arrays.
It is absolutely incorrect to say that C doesn't have "multidimensional arrays".
It does. The only contexts when a statement like that like that can be valid are
the ones when the distinction between arrays of arrays and some other way of
implementing multidimensional arrays is important.
In C you can define arrays of arrays, and the way that the
declarations work (first index closest to identifier defines the
largest arrays) makes it seems like C has row-major multidimensional
arrays
No need to mention "row major" when discussing C if one talks about
"arrays of arrays" and the way C's declarations work "inside to
out." Correct, no?
Yes, that and the additional assumption that the inner single-dimensional arrays
represent specifically _rows_. Without such assumption, you'd only be able to
call them first-index-major or left-index-major.
--
Best regards,
Andrey Tarasevich
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Adam Nemitoff | last post by:
Is is possible to construct a SELECT statement that contains a WHERE clause that uses the value from a column in the "next" row? ie. given a table with a single field named "myField" with the...
0
by: Bruce | last post by:
I have three tables in SQL serve tblareas (w/autoincrement ID tblprograms (w/autoincrement ID tblphases (w/autoincrement ID I've build cascading relation from tblareas <one-many> tblprograms...
3
by: Eric Newton | last post by:
Given databinding an array of System.Version types: Given that "SomeObject" type has a Version property: public class SomeObject { public Version Version { get; } public string Description {...
0
by: Mohammad Ali via DotNetMonster.com | last post by:
hi guys, I have a problem with my datagrid. My form is set up so I have two textboxes an add button and an editable datagrid. The datagrid is bound to a datatable which is in my cache.When I...
2
by: jerry.ranch | last post by:
I've been using row source with the QBE for my list and combo boxes..when would I use control source? jerry
10
by: craig.keightley | last post by:
I am trying to get the next row within a loop for a script i am developing... I need to display a final table row within the table that i have displayed on the page, but i only want to show it...
0
by: eduardasm | last post by:
Hello, I have a problem with XML schema update for one XML column (problem exists in both SP1 and SP2 for SQL Server 2005). 1. I have a table that looks like this: CREATE TABLE .( NOT NULL...
10
by: =?Utf-8?B?Q2hyaXMgRy4=?= | last post by:
How would I output a row for the Computed sums? I just want to append it as a row at the bottom of my gridview table.
4
by: webandwe | last post by:
Hi, I have a row called a in mysql with a bunch of surnames. how do I do a select so that my sql returns all the text that start with a. $q = mysql_query("select * from details Where a='a'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.