473,385 Members | 1,570 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.

pageup/pagedwn implementation

Hi all,
I am looking for some sample code which shows how to implement pageup/
pagedown feature using C language similar to the ones we encounter in
our mobile devices.In mobiles if we dont have enough view space to
show entire content of single message,we provide the feature to do key
up/key dn or pageup/pagedn.I have tried a similar code here given
below,I would appreciate if some one could give me sample code or
links regarding implementing this feature in embedded devices using C
language only.
#include <stdio.h>
#include "string.h"
void pageup();
void pagedown();
static int pagecounter=0;
int bytesperpage=161;
int numpages=0;
int contentremaining=0;
char* customstringcopy=NULL;
char arr[161]={0};
int main(int argc, char *argv[])
{
int totlen=0;
int pagenum=0;
char* customstring=NULL;

char* data="Bloodshed Dev-C++ is a full-featured Integrated
Development Environment (IDE) for the C/C++ programming language. It
uses Mingw port of GCC (GNU Compiler Collec.";
char* stringdata="Bloodshed Dev-C++ is a full-featured Integrated
Development Environment (IDE) for the C/C++ programming language. It
uses Mingw port of GCC (GNU Compiler Collection) as it's compiler. Dev-
C++ can also be used in combination with Cygwin or any other GCC based
compiler.";
char* stringdata1="the #bloodshed channel has recently been
created on the Undernet IRC server. I will be please to talk with you
there so feel free to join :) If you want have an IRC client you can
get one for Windows at mirc.com and for Linux at xchat.org";
char* stringdata2="You can subscribe to the Dev-C++ mailing list
(for asking and answering questions on Dev-C++ and C/C++ programming)
by clicking here and filling out the subscribe form there.";

totlen=strlen(stringdata)+strlen(stringdata)+strle n(stringdata2);
printf("total length is %d\n",totlen);
printf("length of data is %d\n",strlen(data) );
customstring=(char*)(malloc)(totlen+4);
customstringcopy=customstring;
memset(customstring,0,totlen+4);

memcpy(customstring,stringdata,strlen(stringdata)) ;
customstring=customstring+strlen(stringdata);
customstring[0]='\n';
customstring++;
/*printf("%s\n",stringdata);
printf("%s\n",customstringcopy);*/

/*customstring[0]='\n';
customstring++;*/

memcpy(customstring,stringdata1,strlen(stringdata1 ));
customstring=customstring+strlen(stringdata1);
customstring[0]='\n';
customstring++;
/*printf("%s\n",stringdata1);
printf("%s\n",customstringcopy);*/

memcpy(customstring,stringdata2,strlen(stringdata2 ));
customstring=customstring+strlen(stringdata2);
customstring[0]='\n';
customstring++;
/* printf("%s\n",stringdata2);*/
printf("%s\n",customstringcopy);

numpages=totlen/bytesperpage;
printf("total number of pages is %d\n",numpages);
contentremaining=(totlen)%(bytesperpage);
if(contentremaining 0)
{
numpages=numpages+1;

}
printf("total number of pages is %d\n",numpages);
for(pagenum=0;pagenum<=numpages;pagenum++)
{
pageup();
}
for(pagenum=numpages;pagenum>0;pagenum--)
{
pagedown();
}
system("PAUSE");
return EXIT_SUCCESS;
}

void pageup()
{
if(pagecounter<numpages)
{
pagecounter++;
printf("pagecounter value is %d\n",pagecounter);
memcpy(arr,customstringcopy,161);
printf("%s\n\n",arr);
customstringcopy=customstringcopy
+bytesperpage;
}
}

void pagedown()
{

if(pagecounter==numpages)
{
pagecounter--;
printf("pagecounter value is %d
\n",pagecounter);
customstringcopy=customstringcopy-2*(bytesperpage);
memcpy(arr,customstringcopy,161);
printf("%s\n\n",arr);
}
else
{
if(pagecounter>1)
{
pagecounter--;
printf("pagecounter value is %d
\n",pagecounter);
customstringcopy=customstringcopy-(bytesperpage);
memcpy(arr,customstringcopy,161);
printf("%s\n\n",arr);
}
}
/* if(pagecounter>0)
{

customstringcopy=customstringcopy-
bytesperpage;
memcpy(arr,customstringcopy,161);
printf("%s\n\n",arr);

} */

}

Looking farward for your replies and advanced thanks for the same,
Regards,
s.subbarayan
Oct 28 '08 #1
27 1984
ssubbarayan wrote:
Hi all,
I am looking for some sample code which shows how to implement pageup/
pagedown feature using C language similar to the ones we encounter in
our mobile devices.In mobiles if we dont have enough view space to
show entire content of single message,we provide the feature to do key
up/key dn or pageup/pagedn.I have tried a similar code here given
below,I would appreciate if some one could give me sample code or
links regarding implementing this feature in embedded devices using C
language only.
<snip>

I don't think you'll get much help here. First off, no one is going to
wade through that code finding bugs for you - that's *your* job, and the
job of your colleagues. Secondly, it doesn't look like a hard task - if
you can't get this right, you're in the wrong job.

However, I'll give you some free general advice. The compiler doesn't
care what your code looks like, but other people (including yourself)
*do* - write legible code!

The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).

In C, put spaces around operators (except "*", "&", "++" and "--"),
after commas, and after keywords (but not after an open bracket, or
after a function name). There are a few variations in style rules, but
these examples show a reasonable set:

memset(customstring, 0, totlen + 4);
customstring = customstring + strlen(stringdata1);
for (pagenum = 0; pagenum <= numpages; pagenum++) {
pageup();
}

Avoid names like "customstringcopy" - they are horrible to read. Where
practical, avoid global names in preference for local names, which can
be shorter (and clearer) without conflicts. If you *do* have to use a
long name, write it as "customStringCopy" or "custom_string_copy" - it's
much easier to read.
Oct 28 '08 #2
David Brown said:
ssubbarayan wrote:
>Hi all,
I am looking for some sample code which shows how to implement pageup/
pagedown feature [...]
<snip>

I don't think you'll get much help here. First off, no one is going to
wade through that code finding bugs for you - that's *your* job, and the
job of your colleagues.
You'd be surprised how often people here *do* wade through the code finding
bugs for OPs...
Secondly, it doesn't look like a hard task - if
you can't get this right, you're in the wrong job.
Perhaps. But first they have something else to get right...
However, I'll give you some free general advice. The compiler doesn't
care what your code looks like, but other people (including yourself)
*do* - write legible code!
Yes. I took one look and thought "let someone else do that one". If I want
to look at obscure code, I can go and read IOCCC entries.

--
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
Oct 28 '08 #3
On 28 Oct, 07:14, David Brown <da...@westcontrol.removethisbit.com>
wrote:
In C, put spaces around operators (except "*", "&", "++" and "--"),
after commas, and after keywords (but not after an open bracket, or
after a function name). *There are a few variations in style rules, but
these examples show a reasonable set:
Not wanting to get into a style war (but what better place
than c.l.c. for that?), but spaces after open brackets are
fantastic. Instead of:
memset(customstring, 0, totlen + 4);
customstring = customstring + strlen(stringdata1);
for (pagenum = 0; pagenum <= numpages; pagenum++) {
* * * * pageup();
}
try using:

memset( customstring, 0, totlen + 4 );
customstring = customstring + strlen( stringdata1 );
for( pagenum = 0; pagenum <= numpages; pagenum++ ) {
pageup();
}

because, as you say,
it's much easier to read.
But I certainly agree with David that those long
mono-case names are atrocious. Break up the words
with underscores, for the love of Bob!

--
William Pursell
Oct 29 '08 #4
David Brown <da***@westcontrol.removethisbit.comwrote:
ssubbarayan wrote:
Hi all,
I am looking for some sample code which shows how to implement pageup/
pagedown feature using C language similar to the ones we encounter in
our mobile devices.In mobiles if we dont have enough view space to
show entire content of single message,we provide the feature to do key
up/key dn or pageup/pagedn.I have tried a similar code here given
below,I would appreciate if some one could give me sample code or
links regarding implementing this feature in embedded devices using C
language only.

I don't think you'll get much help here. First off, no one is going to
wade through that code finding bugs for you - that's *your* job, and the
job of your colleagues. Secondly, it doesn't look like a hard task - if
you can't get this right, you're in the wrong job.

However, I'll give you some free general advice. The compiler doesn't
care what your code looks like, but other people (including yourself)
*do* - write legible code!
And do note that if you think you can read you code, because after all
you've written it yourself - consider what will happen when you come
back to that program half a year from now, to add another option.
The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).
Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.

Richard
Oct 29 '08 #5
Richard Bos wrote:
David Brown <da***@westcontrol.removethisbit.comwrote:
....
The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).

Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.
<http://en.wikipedia.org/wiki/French_spacingsuggests a much more
complicated history, one that is incompatible with yours (and
completely lacking in ridiculously stupid gratuitous insults). If you
know that the Wikipedia history is inaccurate, I'd recommend making
some edits.
Oct 29 '08 #6
Richard Bos wrote:
David Brown <da***@westcontrol.removethisbit.comwrote:
>The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).

Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.
No, two spaces after a full stop is a habit for good typewriting style
in all Latin alphabet languages (including American as well as English).
It comes from the simple fact that when reading, there is a longer
pause at the end of a sentence than for punctuation within a sentence.
With good typesetting, the space after a period is not exactly twice the
space between words (in particular, it should be more "stretchy" when
justifying text), but it's the best you can do with a fixed-width font.

Using just one space after a full stop is a habit from when amateurs
started using computers with word processors and produced ugly and
inconsistent documents instead of leaving the work to professionals.

Have a read of the TeX Book - just because it is written by an American,
doesn't mean it's wrong!

(And I know using a hyphen with spaces is bad typography, but ASCII
doesn't have an en-dash - you can blame *that* one on Americans if you
like.)
Oct 29 '08 #7
William Pursell wrote:
>
.... snip ...
>
try using:

memset( customstring, 0, totlen + 4 );
customstring = customstring + strlen( stringdata1 );
for( pagenum = 0; pagenum <= numpages; pagenum++ ) {
pageup();
}
Actually, IMO you should put the space after the 'for'. for is NOT
a function name, and this practice distinguishes functions from
reserved words or functional macros. It also avoids any need for a
space AFTER the '('.

This makes the above appear as:

for (pagenum = 0; pagenum <= numpages; pagenum++) {
pageup();
}

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Oct 30 '08 #8
Richard Bos wrote:
David Brown <da***@westcontrol.removethisbit.comwrote:
.... snip ...
>
>The biggest step here is to find the "space" bar - it's the great
big key at the bottom of your keyboard. When writing text (such
as these posts), there should always be two spaces at the end of
a sentence, and one after other punctuation (such as a comma).

Wrong. Two spaces after a full stop is a habit in the USA, where
people didn't learn to write until the typewriter was invented and
haven't got any more culture since we started using word processors.
In the civilised world, it's one full stop, one space.
I mildly disagree. However, I do abhor people who can't insert at
least one space after a punctuation mark.

Incidentally, anything done to clarify typewritten verbiage
certainly applies to Usenet. Why do rabid classicists want to
reduce the accuracy of reading? :-)

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Oct 30 '08 #9
On 2008-10-29, David Brown <da*********@hesbynett.removethisbit.nowrote:
Have a read of the TeX Book - just because it is written by an American,
doesn't mean it's wrong!

(And I know using a hyphen with spaces is bad typography, but ASCII
doesn't have an en-dash - you can blame *that* one on Americans if you
like.)
I was taught in typing class that a dash is typed as "--" (two
adjacent hyphens)..

--
Grant

Oct 30 '08 #10
On 2008-10-30, CBFalconer <cb********@yahoo.comwrote:
I mildly disagree. However, I do abhor people who can't
insert at least one space after a punctuation mark.

Incidentally, anything done to clarify typewritten verbiage
certainly applies to Usenet. Why do rabid classicists want to
reduce the accuracy of reading? :-)
I'm not sure about rabid classicists, but I think some Usenet
posters (particularly various net.kooks) try subconsciously to
reduce the accuracy of reading as a means to mask the low
quality of the content: the more nonsensical the ideas being
presented, the worse the formatting seems to get. Perhaps it's
not causal, but there seems to be a correlation...

--
Oct 30 '08 #11
On Wed, 29 Oct 2008 20:11:09 -0500, Grant Edwards wrote:
On 2008-10-30, CBFalconer <cb********@yahoo.comwrote:
>I mildly disagree. However, I do abhor people who can't insert at
least one space after a punctuation mark.

Incidentally, anything done to clarify typewritten verbiage certainly
applies to Usenet. Why do rabid classicists want to reduce the
accuracy of reading? :-)

I'm not sure about rabid classicists, but I think some Usenet posters
(particularly various net.kooks) try subconsciously to reduce the
accuracy of reading as a means to mask the low quality of the content:
the more nonsensical the ideas being presented, the worse the formatting
seems to get. Perhaps it's not causal, but there seems to be a
correlation...
People that have a hard time communicating in written form will have
content problems, as well as syntax and form problems. It is because of
lack of ability, not attempts to cover up lack of content.

stonerfish
--
It takes one to know one.
Oct 30 '08 #12
Grant Edwards wrote:
On 2008-10-29, David Brown <da*********@hesbynett.removethisbit.nowrote:
>Have a read of the TeX Book - just because it is written by an American,
doesn't mean it's wrong!

(And I know using a hyphen with spaces is bad typography, but ASCII
doesn't have an en-dash - you can blame *that* one on Americans if you
like.)

I was taught in typing class that a dash is typed as "--" (two
adjacent hyphens)..
That's a common practice, and fine on a typewriter with long enough
hyphens, or if it can do half-spacing - that lets you simulate a decent
em-dash. When it's just two hyphens, I think it looks a bit broken, and
prefer the space-hyphen-space as the least bad choice.

http://en.wikipedia.org/wiki/Em-dash#Em_dash
Oct 30 '08 #13
On 2008-10-30, CBFalconer <cb********@yahoo.comwrote:
>
Actually, IMO you should put the space after the 'for'. for is NOT
a function name, and this practice distinguishes functions from
reserved words or functional macros. It also avoids any need for a
space AFTER the '('.

This makes the above appear as:

for (pagenum = 0; pagenum <= numpages; pagenum++) {
pageup();
}
I tend to adopt the same convention, that is a space after an if,
while etc but not after a function name. However I long since
learned that it isn't worth arguing such points because you never
get anywhere. If you were to be pedantic you could easily argue
that I'm inconsistent because I don't use a space after sizeof -
this reflects my view of sizeof as a pseudofunction rather than a
proper language construct like the other keywords.

The only really important things are that usage is at least reasonably
consistent, there is enough whitespace in there somewhere that you
can see the structure of the code, and in particular that indentation
is not actively misleading.

--
Andrew Smallshaw
an*****@sdf.lonestar.org
Oct 30 '08 #14
jameskuyper <ja*********@verizon.netwrote:
Richard Bos wrote:
David Brown <da***@westcontrol.removethisbit.comwrote:
...
The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).
Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.

<http://en.wikipedia.org/wiki/French_spacingsuggests a much more
complicated history, one that is incompatible with yours (and
completely lacking in ridiculously stupid gratuitous insults).
A page that starts by pointing out that its own title is actually wrong?
Why should I assume that anything else on it is correct?

Meanwhile, I do actually own books in at least six languages, and some
time ago I made the effort of actually _checking this_. Gosh, wow, facts
intruding in a discussion. How gauche... but nevertheless, I did. Only
three books did have two spaces after a full stop, and those were
"typeset" in either troff or TeX - and the rest of the typography was
just as dire. (Yes, K&R2 was one. If only they'd gone to the effort of
making the design of their book read good as the text.)
All other books I own - from six different countries at least, from
dates throughout last century and even before - do not have these double
spaces. In some cases, it may look as if they did, but if you take the
trouble of measuring it (remember that famous programming adagium? Don't
rely on guesswork, _measure_!) it becomes clear that this is a visual
deception, most likely due to the capital which starts the next sentence
not being kerned.
Do the test: open a random book with real (_not_ troff) typography, and
check the difference between ". R" and ". A" or ". T". You'll notice a
_visually_ larger gap between the latter than between the former. If you
put a ruler next to them, though, you'll see that the space is the same,
and it's only the extra internal white in the A and T which makes it
look larger.
If you know that the Wikipedia history is inaccurate, I'd recommend
making some edits.
Why engage in such a futile exercise? Let the facts speak for
themselves, and let the Pikiwediasts argue amongst themselves.

Richard
Oct 31 '08 #15
David Brown <da*********@hesbynett.removethisbit.nowrote:
Richard Bos wrote:
David Brown <da***@westcontrol.removethisbit.comwrote:
The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).
Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.

No, two spaces after a full stop is a habit for good typewriting style
in all Latin alphabet languages (including American as well as English).
Then do please explain why I've hardly ever seen anyone but a USAlien
advocate double spacing full stops, and _never_ anyone in any other
language but English.
Using just one space after a full stop is a habit from when amateurs
Simply wrong. Professionals (and yes, I work for a publisher, so I know
a handful of those) never use two spaces - at least, not outside the
USA.

Richard
Oct 31 '08 #16
Richard Bos wrote:
David Brown <da*********@hesbynett.removethisbit.nowrote:
>Richard Bos wrote:
>>David Brown <da***@westcontrol.removethisbit.comwrote:

The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).
Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.
No, two spaces after a full stop is a habit for good typewriting style
in all Latin alphabet languages (including American as well as English).

Then do please explain why I've hardly ever seen anyone but a USAlien
advocate double spacing full stops, and _never_ anyone in any other
language but English.
>Using just one space after a full stop is a habit from when amateurs

Simply wrong. Professionals (and yes, I work for a publisher, so I know
a handful of those) never use two spaces - at least, not outside the
USA.

Richard
No, every sentence ends with two stops.

That's just the way it is.

Thanks,

Ross F.
Oct 31 '08 #17
Ross A. Finlayson wrote:
Richard Bos wrote:
>David Brown <da*********@hesbynett.removethisbit.nowrote:
>>Richard Bos wrote:
David Brown <da***@westcontrol.removethisbit.comwrote:

The biggest step here is to find the "space" bar - it's the great
big key at the bottom of your keyboard. When writing text (such as
these posts), there should always be two spaces at the end of a
sentence, and one after other punctuation (such as a comma).
Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.
No, two spaces after a full stop is a habit for good typewriting
style in all Latin alphabet languages (including American as well as
English).

Then do please explain why I've hardly ever seen anyone but a USAlien
advocate double spacing full stops, and _never_ anyone in any other
language but English.
>>Using just one space after a full stop is a habit from when amateurs

Simply wrong. Professionals (and yes, I work for a publisher, so I know
a handful of thosThae) never use two spaces - at least, not outside the
USA.

Richard

No, every sentence ends with two stops.

That's just the way it is.
As well, in English, thank you.

Thanks comp.lang.c,

Ross F.
Oct 31 '08 #18
Richard Bos wrote:
jameskuyper <ja*********@verizon.netwrote:
>Richard Bos wrote:
>>David Brown <da***@westcontrol.removethisbit.comwrote:
...
>>>The biggest step here is to find the "space" bar - it's the great big
key at the bottom of your keyboard. When writing text (such as these
posts), there should always be two spaces at the end of a sentence, and
one after other punctuation (such as a comma).
Wrong. Two spaces after a full stop is a habit in the USA, where people
didn't learn to write until the typewriter was invented and haven't got
any more culture since we started using word processors. In the
civilised world, it's one full stop, one space.
<http://en.wikipedia.org/wiki/French_spacingsuggests a much more
complicated history, one that is incompatible with yours (and
completely lacking in ridiculously stupid gratuitous insults).

A page that starts by pointing out that its own title is actually wrong?
The title is "Double spaced sentences". That title makes no assertions,
and correctly describes what the page is about. What are you talking
referring to?

The URL for that page ends in French_spacing. One of the first things
the page discusses is the fact that the term "french spacing" has become
a popular term for double spacing, despite being historically
inaccurate. Is that what you're referring to? But French_spacing isn't
the title - it's the URL.
Why should I assume that anything else on it is correct?
As a general rule, I find that texts which contain such disclaimers tend
to be more accurate than those which do not. Such disclaimers usually
indicate someone paying more than the usual amount of attention to detail.

However, I wouldn't recommend assuming that anything that article says
is correct; any more than you should make that same assumption about any
other source of information. If you have any interest in the subject,
and doubts about the accuracy of that article, I'd recommend following
the traditional approach to verifying the accuracy of that article, by
tracking down the citations in the bibliography. There's 67 of them,
plenty to choose from.
Meanwhile, I do actually own books in at least six languages, and some
time ago I made the effort of actually _checking this_.
The main conflict between your brief statement and the wikipedia article
is that you claim double spacing as an American habit; presumably one we
still practice, though you're not entirely clear on that point. The
wikipedia article identifies double spacing as a British invention that
has since gone out of style, even in Britain. Since "habit" and
"invention" are two very different things, even that conflict is less
than perfectly clear.

The wikipedia article identifies the invention of the typewriter as a
key event in the adoption of this practice; you mention the typewriter,
but it's not entirely clear whether you're implying a causal connection,
or merely mentioning it as part of your tirade about how stupid
Americans are.

Relevant evidence for distinguishing between your assertions and the
ones made in the Wikipedia article would have to distinguish between
British and American texts, would have to include both typeset and
typewritten texts, and would have to include typeset texts from before
the typewriter was invented. I couldn't check this out using my book
collection; while it includes about 2000 books, almost all of them were
typeset in the US, and all of them were typeset after the invention of
the typewriter. Books typeset before that invention are mostly
collector's items, and I'm not that type of a collector. The sample I've
looked at this morning didn't include any with double spacing after
sentences, which provides no support for your assertion that this is an
American habit.

The evidence you describe involves only typeset books, does not
distinguish American and British sources, does not distinguish between
texts written before and after the invention of the typewriter. It's not
a very useful study for resolving this issue.
Oct 31 '08 #19
rl*@hoekstra-uitgeverij.nl (Richard Bos) writes:
jameskuyper <ja*********@verizon.netwrote:
<snip>
><http://en.wikipedia.org/wiki/French_spacingsuggests a much more
complicated history, one that is incompatible with yours (and
completely lacking in ridiculously stupid gratuitous insults).

A page that starts by pointing out that its own title is actually wrong?
Why should I assume that anything else on it is correct?

Meanwhile, I do actually own books in at least six languages, and some
time ago I made the effort of actually _checking this_. Gosh, wow, facts
intruding in a discussion. How gauche... but nevertheless, I did. Only
three books did have two spaces after a full stop, and those were
"typeset" in either troff or TeX - and the rest of the typography was
just as dire.
That will tell you about the books you happen to have, not about the
history of this notion. To verify that it is not a fiction, you need
to have a book in English, published in the UK or the USA, sometime
between roughly the middle of the 19th and 20th centuries. The only
two I have to hand are an OED (1955 reprint of the 1933 edition) and a
Shakespeare (1903 but reset in 1943). Both show the fashion for wider
space after a full stop, though not the "full quad" suggested by
typographers of the late 19th century.

The habit got incorporated into typing simply because it was in
fashion when typing started. I can't say anything about French habits
at that time since I don't have books published in France at the right
date.

--
Ben.
Oct 31 '08 #20
Grant Edwards wrote:
Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
>Meanwhile, I do actually own books in at least six languages,
and some time ago I made the effort of actually _checking this_.
Gosh, wow, facts intruding in a discussion. How gauche... but
nevertheless, I did. Only three books did have two spaces after
a full stop,

Nobody claimed that the "two spaces after a full stop" applied
to typeset material. It was a rule meant for typewritten
material where there was only a single, fixed-width, space.
However, let me point out that Usenet messages, written according
to the appropriate protocols, are using fixed width fonts with
fixed width spaces. The critical thing is not the 'typewriter',
but the physical appearance of the end product.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Oct 31 '08 #21
In article <87************@bsb.me.ukBen Bacarisse <be********@bsb.me.ukwrites:
rl*@hoekstra-uitgeverij.nl (Richard Bos) writes:
....
Only
three books did have two spaces after a full stop, and those were
"typeset" in either troff or TeX - and the rest of the typography was
just as dire.

That will tell you about the books you happen to have, not about the
history of this notion. To verify that it is not a fiction, you need
to have a book in English, published in the UK or the USA, sometime
between roughly the middle of the 19th and 20th centuries.
I have been checking and found two reports from the National Physical
Laboratory, dated 1980 en 1982. The major advantage is that these are
written using a monospace font and not all text is right justified. They
both contain only a single space after the full stop. I can not get
my hands currently on older reports because this institute is in the
middle of a renovation/new building, and so the library works only in
part.

Other features: no space before punctuation, punctuation after a closing
quotation mark if the punctuation is not part of the quote, etc..
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Oct 31 '08 #22
On 2008-10-31, CBFalconer <cb********@yahoo.comwrote:
Grant Edwards wrote:
>Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
>>Meanwhile, I do actually own books in at least six languages,
and some time ago I made the effort of actually _checking this_.
Gosh, wow, facts intruding in a discussion. How gauche... but
nevertheless, I did. Only three books did have two spaces after
a full stop,

Nobody claimed that the "two spaces after a full stop" applied
to typeset material. It was a rule meant for typewritten
material where there was only a single, fixed-width, space.

However, let me point out that Usenet messages, written according
to the appropriate protocols, are using fixed width fonts with
fixed width spaces. The critical thing is not the 'typewriter',
but the physical appearance of the end product.
Quite. When I was taught typing in school, it was a mistake
(just like a misspelled word) if you didn't put two spaces
after a period. I continue to do so 30+ years later.

--
Grant Edwards grante Yow! Are the STEWED PRUNES
at still in the HAIR DRYER?
visi.com
Oct 31 '08 #23
>>>>"CBF" == CBFalconer <cb********@yahoo.comwrites:

CBFHowever, let me point out that Usenet messages, written
CBFaccording to the appropriate protocols, are using fixed width
CBFfonts with fixed width spaces.

Cite an RFC that tells me it is incorrect to display my messages in
Times New Roman, please.

Charlton

--
Charlton Wilbur
cw*****@chromatico.net
Oct 31 '08 #24

"James Kuyper" <ja*********@verizon.netwrote in message
news:de*****************@nwrddc02.gnilink.net...
Richard Bos wrote:
>jameskuyper <ja*********@verizon.netwrote:
The title is "Double spaced sentences". That title makes no assertions,
and correctly describes what the page is about. What are you talking
referring to?
the typewriter was invented. I couldn't check this out using my book
collection; while it includes about 2000 books, almost all of them were
typeset in the US, and all of them were typeset after the invention of the
typewriter. Books typeset before that invention are mostly collector's
items, and I'm not that type of a collector.
If it's any help, I have a book typeset and printed in England around 1720.

The gap between sentences (between a full-stop and the first word of the
next sentence) seems two or three times as wide as a normal space.

--
bartc

Oct 31 '08 #25
Charlton Wilbur wrote:
CBFalconer <cb********@yahoo.comwrites:
>However, let me point out that Usenet messages, written
according to the appropriate protocols, are using fixed width
fonts with fixed width spaces.

Cite an RFC that tells me it is incorrect to display my messages
in Times New Roman, please.
I can't pick one out, but believe it exists. You may wish to read,
with care, rfc2822.txt, rfc2821.txt, rfc1036s.txt, rfc822.txt. I
believe that 'ASCII' is also specified. MIME is a different
matter, but does not apply to Usenet.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Nov 1 '08 #26
On Oct 31, 5:29*pm, Charlton Wilbur <cwil...@chromatico.netwrote:
>>>"CBF" == CBFalconer *<cbfalco...@yahoo.comwrites:

* * CBFHowever, let me point out that Usenet messages, written
* * CBFaccording to the appropriate protocols, are using fixed width
* * CBFfonts with fixed width spaces.

Cite an RFC that tells me it is incorrect to display my messages in
Times New Roman, please.
This is one of the few "usenet is/is not that" messages of Chuck with
real practical value.
I am sure you know using fixed (same for all characters) character
width
allows one to draw simple graphics which will be lost with
proportional
fonts. Legacy from the times when terminals had character generators,
each cell say 12x8 pixels (I still emulate that at more places than I
care to remember :-) ).

Didi

------------------------------------------------------
Dimiter Popoff Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------
http://www.flickr.com/photos/didi_tg...7600228621276/

Original message: http://groups.google.com/group/comp....0?dmode=source
Nov 1 '08 #27
>>>>"D" == Didi <dp@tgi-sci.comwrites:

DOn Oct 31, 5:29Â*pm, Charlton Wilbur <cwil...@chromatico.netwrote:
>>>>"CBF" == CBFalconer Â*<cbfalco...@yahoo.comwrites:
CBFHowever, let me point out that Usenet messages, written
CBFaccording to the appropriate protocols, are using fixed width
CBFfonts with fixed width spaces.
>Cite an RFC that tells me it is incorrect to display my messages
in Times New Roman, please.
DThis is one of the few "usenet is/is not that" messages of Chuck
Dwith real practical value. I am sure you know using fixed (same
Dfor all characters) character width allows one to draw simple
Dgraphics which will be lost with proportional fonts.

Indeed; but while I am aware of several RFCs that specify how I am to
encode and transmit my news messages, I am not aware of a single one
that specifies how I must display them.

Had Mr Falconer said, as you did, that it is *advisable* to use fixed
width fonts, that would be one thing; but he went a good deal farther
than that. Like most of his prescriptivist advice, this one goes so far
as to be absurd, and is an attempt to present his opinion as universal.

Charlton

--
Charlton Wilbur
cw*****@chromatico.net
Nov 1 '08 #28

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

Similar topics

1
by: yihan | last post by:
Hi, I would like to make a pageUp and pageDown button to go up or down in the text ( it is like PgUp/PgDown on the keyboard). But it works on the IE but not on netscape 7.1. Could somebody tell me...
1
by: Harald Solvberg | last post by:
I want a datagrid object that will not intercept PageUp or PageDown keystrokes so that instead the tabcontrol it's on can pick it them up and change TabPages. Any idea how to create a new version...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
29
by: Enrico `Trippo' Porreca | last post by:
Both K&R book and Steve Summit's tutorial define a getline() function correctly testing the return value of getchar() against EOF. I know that getchar() returns EOF or the character value cast to...
2
by: Phil Galey | last post by:
I have a Panel control docked on all sides on a form and the panel control contains a PictureBox. I'm using the KeyDown event of the form to respond to the and keys for resizing the image and the...
52
by: lovecreatesbeauty | last post by:
Why the C standard committee doesn't provide a standard implementation including the C compiler and library when the language standard document is published? C works on the abstract model of low...
0
by: =?Utf-8?B?SGFyYWxk?= | last post by:
I have a datagrid on a tabcontrol and want PageUp and PageDown to change tabs on the tabcontrol but when on the datagrid the keystrokes get captured by the datagrid. I've created my own datagrid...
2
by: ssubbarayan | last post by:
Dear all, I am in the process of implementing pageup/pagedown feature in our consumer electronics project.The idea is to provide feature to the customers to that similar to viewing a single sms...
9
by: ssubbarayan | last post by:
Dear all, I am in the process of implementing pageup/pagedown feature in our consumer electronics project.The idea is to provide feature to the customers to that similar to viewing a single sms...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?

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.