473,385 Members | 1,630 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,385 software developers and data experts.

how to count rows and columns of integers/doubles in a file?

Hi,

I have some files which has the following content:

0 0 0 0 0 0
0 1 1 1 1 0
0 1 1 1 1 0
0 1 1 1 1 0
0 1 1 1 1 0
0 0 0 0 0 0

I'm making a function for a bigger program, that

1) counts number of columns in each row
2) verifies that there are the same number of columns in each row
(if not: error + quit)
3) increments row count after one row is finished
4) stops execution if it encounters anything that is not an
integer (later: should also work for doubles)

My only problem is that I don't know how to switch line (carriage
return) or how to detect it using scanf. Besides that, the
program is almost finished. See below:
- - - - - - - - - - - - - - - -
#include <stdio.h>
void int_getdata(char *filename, unsigned int *x, unsigned int
*y);
int main()
{
unsigned int n_x[3], n_y[3];

int_getdata("unknowns.dat", &n_x[0], &n_y[0] );
int_getdata("BC_types.dat", &n_x[1], &n_y[1] );
// double_getdata("BC_values.dat", &n_x[2], &n_y[2] );

return 0;
}

void int_getdata(char *filename, unsigned int *x, unsigned int
*y)
{
FILE *fp;

unsigned int old_nx;
int int_readvalue, returnvalue;
//double double_readvalue;

old_nx = 0; /* reset */
*x = 0;
*y = 0;

if ( (fp = fopen(filename, "r") ) == NULL)
{
printf("Cannot open file %s.\n", filename);
system("PAUSE"); /* give the user at chance to see this
error before the windows shuts down */
exit(1);
}

/* get nx and ny */
do{
returnvalue = fscanf(fp, "%i", &int_readvalue); /* all
input must be valid */

if(returnvalue == 1) (*x)++; /* nx is getting larger */
else{
printf("Error: non-valid input found in %s.\n",
filename);
exit(1);
}

if(int_readvalue == '\n')
{
if(old_nx != 0 && old_nx != *x)
{
printf("ERROR: nx is not a constant in file
%s!\n", filename);
exit(1);
}
else /* we should now be sure that nx is constant and
move on to the next input line */
{
old_nx = *x;
y++; /* ny is getting larger */
*x = 0;
}
}
} while(returnvalue != EOF);

printf("\nFinished reading from file %s: (x,y) = (%i,%i).\n",
filename, *x, *y);
fclose(fp); /* close input file, finished reading values in
*/
}

- - - - - - - - - - - - - - - -

I hope somebody can help me solve this small problem, so I can
finish the program....

I also get these small warnings, but they are not critical:

warning C4013: 'system' undefined; assuming extern returning int

warning C4013: 'exit' undefined; assuming extern returning int
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk

Mar 15 '06
68 6732
Ben Pfaff wrote:
Mark McIntyre <ma**********@spamcop.net> writes:
CBFalconer <cb********@yahoo.com> wrote:
Martin Jxrgensen wrote:

void getdata(char *filename, unsigned *pCols, unsigned *pRows, int *count)
{

void getdata(char *filename, /* room to describe */
unsigned *pCols, /* the various parameters */
unsigned *pRows, /* if desired */
int *count)


personally I consider this an abomination. The first form is way
more readable.


I work for a company that has the latter as required style.
(If you violate it you get scorched in code reviews.)


As usual, it depends. If there are many parameters, the second
style is almost mandatory. If very few, and the parameter names
are descriptive, the first is preferable. A mongrel is useful to
group associated parameters, such as array pointer and array size.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>

Mar 19 '06 #51
On Sun, 19 Mar 2006 03:22:39 +0100, Martin Jørgensen
<un*********@spam.jay.net> wrote:
Barry Schwarz wrote:
On Sat, 18 Mar 2006 16:04:24 +0100, "Martin Joergensen"
<un*********@spam.jay.net> wrote:-snip-
Sorry, your formatting makes it impossible to compile your code and I
didn't spot these in my review.


Okay, forget about this wrapping thing. Guess you're right. I just can't
restrict Visual studio from making lines longer than 65 characters or


It's not a Visual Studio thing. It's a matter of personal discipline.
so. I went through all the options and help. The following should be
better in that I don't think it inserts ekstra linebreaks in places
never intended to have linebreaks. So what's important is what's inside
main() and I hope that copy/pasting should work - I manually fixed some
comments etc.
I compiled your code. I received only two types of errors:

count is unsigned but you pass its address to getdata which is
expecting an int*. Change the prototype and definition.

You define T and T_new twice within the same block, once at
the top of the function and once when you are ready to call malloc.
The latter should be replaced with a simple assignment statement.

After these changes your code compiled fine. Now you get to test.

snip
void getdata(char *filename, unsigned *pCols, unsigned *pRows, int *count); snipint main(void)
{ snip unsigned count, n_x[max_input_files], n_y[max_input_files];
/* and a lot more var's, not necessary in this example */
double **T, **T_new; snip
double **T = malloc((n_y[0]+1)*sizeof(double*)); /* n_y = rows */
double **T_new = malloc((n_y[0]+1)*sizeof(double*)); /* n_y = rows */ snip}

delete
Remove del for email
Mar 19 '06 #52
Barry Schwarz wrote:
On Sun, 19 Mar 2006 03:22:39 +0100, Martin Jørgensen
<un*********@spam.jay.net> wrote: -snip-
I compiled your code. I received only two types of errors:

count is unsigned but you pass its address to getdata which is
expecting an int*. Change the prototype and definition.
Yes, stupid mistake - I think I would have found that myself, if I could
just figure out how to make the program compile at that time.
You define T and T_new twice within the same block, once at
the top of the function and once when you are ready to call malloc.
The latter should be replaced with a simple assignment statement.
Yes, I can see that now... I never thought about it before but now it's
ofcourse very clear. This was actually the biggest problem - figuring
out that I should just remove the definition in the line where malloc
was called...
After these changes your code compiled fine. Now you get to test.


Yes, Pedro already mailed it to me and wrote what caused the problems to
this group... So I just needed a small push in the right direction and
that was all. Thanks for helping... Looks like I have everything under
control finally...

Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Mar 20 '06 #53
CBFalconer wrote:
Martin Jørgensen wrote:

... snip ...
I guess I have subscribed to this group for about 1,5 months and
being called "a moron", being told to "fuck off" and being told
that "You are quite possibly the most worthless programmer (and
human being) I've ever seen" is just too childish.

You didn't get that from me, and usenet is full of ignorant boors.
Ignore them, or at least their boorish behaviour.


Yeah, you're right. But you know how it is...... I've been on usenet for
a couple of years and have been using it practically every day. It still
pisses you off when you try to behave nice to somebody and that person
repays your gratitude with loads of bullshit, like I've seldom seen.
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Mar 20 '06 #54
Jordan Abel <ra*******@gmail.com> writes:
On 2006-03-19, Ben Pfaff <bl*@cs.stanford.edu> wrote:
On Sun, 19 Mar 2006 07:18:56 -0500, in comp.lang.c , CBFalconer
<cb********@yahoo.com> wrote:
void getdata(char *filename, /* room to describe */
unsigned *pCols, /* the various parameters */
unsigned *pRows, /* if desired */
int *count)


I work for a company that has the latter as required style.
(If you violate it you get scorched in code reviews.)


Required always, or required for non-self-explanatory argument lists
and/or argument lists over a certain length?


It's always required. Some old code doesn't follow the coding
standard, but new code must.

The argument comments are stylized: each one must start with IN,
OUT, or IN/OUT according to its usage.
In other words, are we talking about

void f(void /* room to describe void */
)


There'd be no comment on (void) because that's not an argument;
it's a marker that indicates the absence of arguments.
--
"Give me a couple of years and a large research grant,
and I'll give you a receipt." --Richard Heathfield
Mar 20 '06 #55
Martin Jørgensen <un*********@spam.jay.net> writes:
[...]
I guess I have subscribed to this group for about 1,5 months and being
called "a moron", being told to "fuck off" and being told that "You
are quite possibly the most worthless programmer (and human being)
I've ever seen" is just too childish.


Yes, it is. Most of us try not to be such jerks, though.

--
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.
Mar 20 '06 #56
Martin Jørgensen <un*********@spam.jay.net> writes:
Mark F. Haigh wrote:
Martin Jørgensen wrote:

-snip-
It may "work", but it's certainly a childish effort, at best. Let me
guess, you're a first year student? Your code sucks. Unclear,
unmaintainable, unportable. Amateur.


No, I'm not a first a first year student.
<snip>
It is not a homework assignment.

<snip>
It is not a homework assignment.

Very cute. I'm impressed. I think all of us are.


I see you have a very big problem with me telling you that this wasn't
a homework assignment. You don't have to be impressed by that. That is
nothing.


Not to defend Mark's rudeness, but it might be nice if you told us
just why you're trying to write this program. Is it part of a larger
project? Is it just a personal exercise? A number of people have
spent considerable time helping you with this; knowing what the goal
is might be helpful. (Sorry if you've already explained this; I
haven't followed the thread very closely.)

--
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.
Mar 20 '06 #57
On 2006-03-20, Ben Pfaff <bl*@cs.stanford.edu> wrote:
Jordan Abel <ra*******@gmail.com> writes:
On 2006-03-19, Ben Pfaff <bl*@cs.stanford.edu> wrote:

On Sun, 19 Mar 2006 07:18:56 -0500, in comp.lang.c , CBFalconer
<cb********@yahoo.com> wrote:
>void getdata(char *filename, /* room to describe */
> unsigned *pCols, /* the various parameters */
> unsigned *pRows, /* if desired */
> int *count)

I work for a company that has the latter as required style.
(If you violate it you get scorched in code reviews.)


Required always, or required for non-self-explanatory argument lists
and/or argument lists over a certain length?


It's always required. Some old code doesn't follow the coding
standard, but new code must.

The argument comments are stylized: each one must start with IN,
OUT, or IN/OUT according to its usage.


What exactly is an "OUT" argument? a pointer? what would you call a FILE
* argument that is supposed to be read to / written from?
Mar 20 '06 #58
Jordan Abel <ra*******@gmail.com> writes:
On 2006-03-20, Ben Pfaff <bl*@cs.stanford.edu> wrote:
The argument comments are stylized: each one must start with IN,
OUT, or IN/OUT according to its usage.


What exactly is an "OUT" argument? a pointer?


A pointer that is written to.
A pointer that is only read from would be an IN argument (and
would generally be marked `const'.)
what would you call a FILE * argument that is supposed to be
read to / written from?


It's debatable. Generally this sort of thing would be clarified
elsewhere. Comments are (generally) meant for consumption by
humans, not computers, so you don't need rules for them that can
be evaluated by computers.
--
"I'm not here to convince idiots not to be stupid.
They won't listen anyway."
--Dann Corbit
Mar 20 '06 #59
Keith Thompson wrote:
-snip-
Not to defend Mark's rudeness, but it might be nice if you told us
just why you're trying to write this program. Is it part of a larger
project? Is it just a personal exercise? A number of people have
spent considerable time helping you with this; knowing what the goal
is might be helpful. (Sorry if you've already explained this; I
haven't followed the thread very closely.)


I think this is off-topic, at least I consider the on-topic discussion
finished.

However, since you absolutely must ask: I'm trying to learn and figure
out how to do basic things in C since I'll graduate as an engineer this
summer (I'm on eigth semester, not a first first year student as "Mark
the child" suggested). Since I'm writing my bachelor project now, I have
plenty of time to learn, to do and make my own exercises or do whatever
I want to learn, (including doing nothing). Usually Matlab is the
preferred choice here but I think C is important to learn, especially
for doing loops. You don't have a problem with me trying to learn C, now
do you?

Because if not, then everything is fine even though this is off-topic.
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Mar 21 '06 #60

Martin Jørgensen wrote:
Keith Thompson wrote:
-snip-
Not to defend Mark's rudeness, but it might be nice if you told us
just why you're trying to write this program. Is it part of a larger
project? Is it just a personal exercise? A number of people have
spent considerable time helping you with this; knowing what the goal
is might be helpful. (Sorry if you've already explained this; I
haven't followed the thread very closely.)
I think this is off-topic, at least I consider the on-topic discussion
finished.


Establishing context, especially for on-topic discussions, is never
off-topic (BTW, discussions on topicality are also always on-topic).
However, since you absolutely must ask:
I see no reason for being touchy about this...
I'm trying to learn and figure
out how to do basic things in C since I'll graduate as an engineer this
summer
Commendable.
(I'm on eigth semester, not a first first year student as "Mark
the child" suggested). Since I'm writing my bachelor project now, I have
plenty of time to learn, to do and make my own exercises or do whatever
I want to learn, (including doing nothing). Usually Matlab is the
preferred choice here but I think C is important to learn, especially
for doing loops.
I'd happily agree that C knowledge isimportant for an engineer, but why
loops specifically?
You don't have a problem with me trying to learn C, now
do you?
That was uncalled for, really.

Don't get me wrong, but you now leave the impression that you only came
here to get what you need, without wanting to give anything back (or
away). This is not how Usenet, or at least this group works. Having
been given lots of good advice, and lots of people having spent
considerable amount of their own time helping you, you can at least
indulge their curiosity.
Because if not, then everything is fine even though this is off-topic.


As I have already said, establishing context, topicality, and etiquette
are never off-topic.

--
BR, Vladimir

Mar 21 '06 #61
Martin Jørgensen <un*********@spam.jay.net> writes:
Keith Thompson wrote:
-snip-
Not to defend Mark's rudeness, but it might be nice if you told us
just why you're trying to write this program. Is it part of a larger
project? Is it just a personal exercise? A number of people have
spent considerable time helping you with this; knowing what the goal
is might be helpful. (Sorry if you've already explained this; I
haven't followed the thread very closely.)
[snip] However, since you absolutely must ask: I'm trying to learn and figure
out how to do basic things in C since I'll graduate as an engineer
this summer (I'm on eigth semester, not a first first year student as
"Mark the child" suggested). Since I'm writing my bachelor project
now, I have plenty of time to learn, to do and make my own exercises
or do whatever I want to learn, (including doing nothing). Usually
Matlab is the preferred choice here but I think C is important to
learn, especially for doing loops. You don't have a problem with me
trying to learn C, now do you?


No, of course I don't have a problem with you trying to learn C. Why
would you think that I do?

One person was rude to you. I suggest ignoring him and moving on.
Don't take it out on the rest of us.

--
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.
Mar 21 '06 #62
Vladimir S. Oka wrote:
Martin Jørgensen wrote:

-snip-
However, since you absolutely must ask:

I see no reason for being touchy about this...


I thought nobody cared and thought it was a waste of usenet-posts for
those interested in programming. But okay.
I'm trying to learn and figure
out how to do basic things in C since I'll graduate as an engineer this
summer

Commendable.

(I'm on eigth semester, not a first first year student as "Mark
the child" suggested). Since I'm writing my bachelor project now, I have
plenty of time to learn, to do and make my own exercises or do whatever
I want to learn, (including doing nothing). Usually Matlab is the
preferred choice here but I think C is important to learn, especially
for doing loops.

I'd happily agree that C knowledge isimportant for an engineer, but why
loops specifically?


Ask mathworks (AFAIR - the company behind Matlab) - Matlab is *REALLY*
slow at doing for-loops etc. I don't know why, since I didn't programmed
Matlab or know how it is programmed. But it is just a fact and also the
reason why I wanted to learn to incorporate C code into Matlab (I did
that recently).
You don't have a problem with me trying to learn C, now
do you?

That was uncalled for, really.

Don't get me wrong, but you now leave the impression that you only came
here to get what you need, without wanting to give anything back (or
away). This is not how Usenet, or at least this group works. Having
been given lots of good advice, and lots of people having spent
considerable amount of their own time helping you, you can at least
indulge their curiosity.


Sorry, I thought most people didn't want to read that kind of
information. I have no problem in explaining why I want to learn to
program in C, but since I already wrote that this thread is not for
doing an exercise or to solve a problem for a teacher, I thought that
there was nothing more to discuss.
Because if not, then everything is fine even though this is off-topic.

As I have already said, establishing context, topicality, and etiquette
are never off-topic.


Ok. I hope I explained why I want to learn to program in C then... If
there's anything else, I would like to explain that too...
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Mar 21 '06 #63
Martin Jørgensen opined:
Vladimir S. Oka wrote:
Martin Jørgensen wrote:
However, since you absolutely must ask:


I see no reason for being touchy about this...


I thought nobody cared and thought it was a waste of usenet-posts for
those interested in programming. But okay.


Oh, dear...
whatever I want to learn, (including doing nothing). Usually Matlab
is the preferred choice here but I think C is important to learn,
especially for doing loops.


I'd happily agree that C knowledge isimportant for an engineer, but
why loops specifically?


Ask mathworks (AFAIR - the company behind Matlab) - Matlab is
*REALLY* slow at doing for-loops etc.


Are you sure it's not what's /inside/ the loops that's slow? I did my
BSc in Matlab, and some one-liners it provides can be *really*
complex, and therefore "slow". You balance the time it'd take you to
the same in C, with the tried-and-tested Matlab functions...
You don't have a problem with me trying to learn C, now
do you?


That was uncalled for, really.

Don't get me wrong, but you now leave the impression that you only
came here to get what you need, without wanting to give anything
back (or away). This is not how Usenet, or at least this group
works. Having been given lots of good advice, and lots of people
having spent considerable amount of their own time helping you, you
can at least indulge their curiosity.


Sorry, I thought most people didn't want to read that kind of
information.


Well, people actually asked.
I have no problem in explaining why I want to learn to
program in C, but since I already wrote that this thread is not for
doing an exercise or to solve a problem for a teacher, I thought that
there was nothing more to discuss.


And the question was not why you want to learn C, rather what's the sue
of your code. There's a world of difference, and the advice on C
coding may differ significantly depending on application.
Because if not, then everything is fine even though this is
off-topic.


As I have already said, establishing context, topicality, and
etiquette are never off-topic.


Ok. I hope I explained why I want to learn to program in C then... If
there's anything else, I would like to explain that too...


You're too touchy and defensive for a near-graduate...

--
BR, Vladimir

All syllogisms have three parts, therefore this is not a syllogism.

Mar 21 '06 #64
"Vladimir S. Oka" <no****@btopenworld.com> writes:
[...] I did my BSc in Matlab, [...]


It's amazing what they give out degrees in these days.
--
"Given that computing power increases exponentially with time,
algorithms with exponential or better O-notations
are actually linear with a large constant."
--Mike Lee
Mar 21 '06 #65
Ben Pfaff opined:
"Vladimir S. Oka" <no****@btopenworld.com> writes:
[...] I did my BSc in Matlab, [...]


It's amazing what they give out degrees in these days.

Oh, bugger. It's my English again...

FWIW, my thesis was in signal processing. The /simulations/ were done
in Matlab. It also (alas!) wasn't "these days", more of the "those
[were the] days" -- and I'm *not* telling you when *that* was. ;-)

--
BR, Vladimir

It is all right to hold a conversation,
but you should let go of it now and then.
-- Richard Armour

Mar 21 '06 #66
Martin Jørgensen schrieb:
Vladimir S. Oka wrote:
Martin Jørgensen wrote: <snip>
(I'm on eigth semester, not a first first year student as "Mark
the child" suggested). Since I'm writing my bachelor project now, I have
plenty of time to learn, to do and make my own exercises or do whatever
I want to learn, (including doing nothing). Usually Matlab is the
preferred choice here but I think C is important to learn, especially
for doing loops.


I'd happily agree that C knowledge isimportant for an engineer, but why
loops specifically?


Ask mathworks (AFAIR - the company behind Matlab) - Matlab is *REALLY*
slow at doing for-loops etc. I don't know why, since I didn't programmed
Matlab or know how it is programmed. But it is just a fact and also the
reason why I wanted to learn to incorporate C code into Matlab (I did
that recently).


<OT>Most of the time, there is a Matlab way of doing things
that replaces explicit loops and is faster. If you do not
perform huge and lengthy computations, writing error-free
(or nearly so) C Code can take up more time than you ever
save by using the C Code.
The same can be said for string handling and the like and
Perl or python vs. C.

However, C code has one or two things going for it:
1) If you restrict the Matlab parts (i.e. mexFunction()
and mexCallMatlab()) to one or two modules and write the
rest in portable C, you can reuse the code.
2) You essentially know what is happening and it does not
change over time. There have been Matlab releases for which
the old rules no longer held, i.e. Matlab code which had
been optimized to the hilt was slower than straightforward
code (even incorporating loop constructs).

Most of the time, it is a good idea to do a prototype in
Matlab or another script language and verify afterwards
whether some part "has to go C" -- by measuring and
profiling.

Note: Matlab is not exactly the most fun environment to debug
through if you have a really huge Matlab-DLL or mexglx (or
whatever they may be called now) where complex error
situations can occur.
</OT>

Apart from that, the study of C probably will not be in vain.
It may help you to understand concepts, maybe just from
another angle, and gives IMO a very good impression of what
is going on underneath. (View the happy "C is a glorified
assembler debates" in a theatre near you.)

You don't have a problem with me trying to learn C, now
do you?


That was uncalled for, really.

Don't get me wrong, but you now leave the impression that you only came
here to get what you need, without wanting to give anything back (or
away). This is not how Usenet, or at least this group works. Having
been given lots of good advice, and lots of people having spent
considerable amount of their own time helping you, you can at least
indulge their curiosity.


Sorry, I thought most people didn't want to read that kind of
information. I have no problem in explaining why I want to learn to
program in C, but since I already wrote that this thread is not for
doing an exercise or to solve a problem for a teacher, I thought that
there was nothing more to discuss.


No, the reason behind the questions "what are you really trying to
do" and "what or who are you doing this for" is that it gives the
other participants a better perspective -- you might be looking for
the wrong things or, if the whole thing is an exercise put to you,
might misunderstand its educational purpose. With this better
perspective, they are able to help you better -- or they can say
that you should revisit the question at a later time, maybe after
you have learnt more. Hopefully the former, even though the latter
is not necessarily to your detriment.

BTW: You want to learn C; there is one thing you can do around here
easily: Try helping other people asking questions around here; it
helps you understand things better -- and if you get something
wrong, you are told so immediately. Both help learning and
remembering.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Mar 21 '06 #67
Michael Mair wrote:
Martin Jørgensen schrieb:

-snip-

Agreed everything...
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Mar 22 '06 #68
On Sun, 19 Mar 2006 09:58:50 -0500, Joe Wright
<jo********@comcast.net> wrote:
I don't know either how to make the VS editors emit spaces instead of
tabs (Anybody else know?). But in preparing a code snippet to be
included in a usenet post I will run it through GNU indent to remove
tabs and indent to 3 spaces.

In VS6 at least:

- Tools / Options / Tabs to control whether tabs or spaces are
inserted for new lines and "shift right" while editing; set separately
for each (desired) file type; also the width of each tab 'stop' (the
width displayed for an actual tab character either inserted or already
present, or the number of spaces inserted for a tab/indent)

- Edit / Advanced / Untabify selection to convert tabs to spaces (or
Tabify to convert leading spaces to tabs) in the file currently being
edited; for the whole file, first Edit / select All

- Edit / Advanced / Show whitespace to see which you've got.
- David.Thompson1 at worldnet.att.net
Apr 3 '06 #69

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

Similar topics

1
by: Dejavous | last post by:
Hi there, I'm a SQL Server 2000 noob and looking for some help. I need to make a simple script that counts the number of rows in a table. Also, i need to make another version ofthe same script,...
1
by: dukefrancis | last post by:
Can anyone tell me how to find the count of columns from a table????
3
by: sheesh | last post by:
hi how am i able to input rows of integers from another file for eg num.txt inside the text file it is as shown 1 3 5 2 4 6 7 9 11 i tried doing so but still couldn't get it string s;
1
by: neehakale | last post by:
If anybody of you knows how to count the no of rows in the excel file then pls tel me....
0
by: JFKJr | last post by:
I have an excel file, which has columns C and D grouped together, I am trying to delete blank columns and rows from the excel file, ungroup the columns and import the file to MS Access using Access...
1
by: mojo123 | last post by:
Hi All, I am looking for a way to count rows in datagrid. The code I have goes something like this: Data1.DatabaseName = Mydata.mdb Data1.Recordsoource = Select * Table1 Where Class = 3 And...
6
by: viki1967 | last post by:
Hi all. I need your help. I realize this script and I do not know where to begin: 1) A simple grid rows / columns. 2) The first column contain an input type = "checkbox" 3) When select...
3
by: ronakinuk | last post by:
how can i unhide rows/columns in excel 2007
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?
1
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 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.