Re: new command: date-insert

2000-02-04 Thread Juergen Vigna
On 03-Feb-2000 Michael Meskes wrote: On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: | + for (int i = 0; i datetmp_len; i++) { In C++ it is adviced to use preincrement instead of postincrement: Could anyone please enlighten me and tell me why preincrement is

Re: new command: date-insert

2000-02-04 Thread Lars Gullik Bjønnes
Andre Poenitz [EMAIL PROTECTED] writes: | Because sometimes it is necessary to create an extraneous copy of the | iterator when using postincrements. This wastes resources. | | It's more or less the following: | | ++i: |i = i + 1 |return i | | i++: |temp = i

Re: new command: date-insert

2000-02-04 Thread Lars Gullik Bjønnes
Juergen Vigna [EMAIL PROTECTED] writes: | On 03-Feb-2000 Michael Meskes wrote: | On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: | | + for (int i = 0; i datetmp_len; i++) { | | In C++ it is adviced to use preincrement instead of postincrement: | | Could anyone

Re: new command: date-insert

2000-02-04 Thread Juergen Vigna
On 03-Feb-2000 Michael Meskes wrote: > On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: >> | + for (int i = 0; i < datetmp_len; i++) { >> >> In C++ it is adviced to use preincrement instead of postincrement: > > Could anyone please enlighten me and tell me why

Re: new command: date-insert

2000-02-04 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | Because sometimes it is necessary to create an extraneous copy of the | iterator when using postincrements. This wastes resources. | | It's more or less the following: | | ++i: |i = i + 1 |return i | | i++: |temp =

Re: new command: date-insert

2000-02-04 Thread Lars Gullik Bjønnes
Juergen Vigna <[EMAIL PROTECTED]> writes: | On 03-Feb-2000 Michael Meskes wrote: | > On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: | >> | + for (int i = 0; i < datetmp_len; i++) { | >> | >> In C++ it is adviced to use preincrement instead of postincrement: | > | >

Re: new command: date-insert

2000-02-03 Thread Lars Gullik Bjønnes
Juergen Vigna [EMAIL PROTECTED] writes: | IDEA for setting locale on the document language: | - | | We store the different babel-languages in tex-strings.C::tex_babel[]. | Would it be possible to instead of having only the name a structure like

Re: new command: date-insert

2000-02-03 Thread Juergen Vigna
On 03-Feb-2000 Lars Gullik Bjønnes wrote: Juergen Vigna [EMAIL PROTECTED] writes: | IDEA for setting locale on the document language: | - | | We store the different babel-languages in tex-strings.C::tex_babel[]. | Would it be possible to

Re: new command: date-insert

2000-02-03 Thread Lars Gullik Bjønnes
"John D. Blair" [EMAIL PROTECTED] writes: A couple of _small_ comments on the code. Jurgen, you should read this too. | + // jdblair: experimental date-insert command | + newFunc(LFUN_DATE_INSERT,"date-insert", | + "", Noop); ^ I know that I have been lazy,

Re: new command: date-insert

2000-02-03 Thread Juergen Vigna
On 03-Feb-2000 Lars Gullik Bjønnes wrote: Juergen Vigna [EMAIL PROTECTED] writes: | This is a C way of doing it since C can't handle several locales at | the same time. C++ and it wonderful Standard Library on the other hand | does support this. And IMHO we should use the C++ locale

Re: new command: date-insert

2000-02-03 Thread Lars Gullik Bjønnes
Juergen Vigna [EMAIL PROTECTED] writes: | ??? I'm more confused then before (and I swear I didn't drink any alcohol | yesterday AND today ;) C cannot handle more than one locale at a time so you have to resort to setting the locale in all functions that need it. C++ OTOH can have several

Re: new command: date-insert

2000-02-03 Thread Jose Abilio Oliveira Matos
On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: [...] | + for (int i = 0; i datetmp_len; i++) { In C++ it is adviced to use preincrement instead of postincrement: for (int i = 0; i datetmp_len; ++i) { Forget my ignorance, I have read the Efective

Re: new command: date-insert

2000-02-03 Thread Michael Meskes
On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: | + for (int i = 0; i datetmp_len; i++) { In C++ it is adviced to use preincrement instead of postincrement: Could anyone please enlighten me and tell me why preincrement is preferred over postincrement? Michael --

Re: new command: date-insert

2000-02-03 Thread Andre Poenitz
On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: | + for (int i = 0; i datetmp_len; i++) { In C++ it is adviced to use preincrement instead of postincrement: Could anyone please enlighten me and tell me why preincrement is preferred over postincrement?

Re: new command: date-insert

2000-02-03 Thread Lars Gullik Bjønnes
Juergen Vigna <[EMAIL PROTECTED]> writes: | IDEA for setting locale on the document language: | - | | We store the different babel-languages in tex-strings.C::tex_babel[]. | Would it be possible to instead of having only the name a structure like

Re: new command: date-insert

2000-02-03 Thread Juergen Vigna
On 03-Feb-2000 Lars Gullik Bjønnes wrote: > Juergen Vigna <[EMAIL PROTECTED]> writes: > >| IDEA for setting locale on the document language: >| - >| >| We store the different babel-languages in tex-strings.C::tex_babel[]. >| Would it be possible

Re: new command: date-insert

2000-02-03 Thread Lars Gullik Bjønnes
"John D. Blair" <[EMAIL PROTECTED]> writes: A couple of _small_ comments on the code. Jurgen, you should read this too. | + // jdblair: experimental date-insert command | + newFunc(LFUN_DATE_INSERT,"date-insert", | + "", Noop); ^ I know that I have been

Re: new command: date-insert

2000-02-03 Thread Juergen Vigna
On 03-Feb-2000 Lars Gullik Bjønnes wrote: > Juergen Vigna <[EMAIL PROTECTED]> writes: > >| > This is a C way of doing it since C can't handle several locales at >| > the same time. C++ and it wonderful Standard Library on the other hand >| > does support this. And IMHO we should use the C++

Re: new command: date-insert

2000-02-03 Thread Lars Gullik Bjønnes
Juergen Vigna <[EMAIL PROTECTED]> writes: | ??? I'm more confused then before (and I swear I didn't drink any alcohol | yesterday AND today ;) C cannot handle more than one locale at a time so you have to resort to setting the locale in all functions that need it. C++ OTOH can have several

Re: new command: date-insert

2000-02-03 Thread Jose Abilio Oliveira Matos
On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: [...] > > | + for (int i = 0; i < datetmp_len; i++) { > > In C++ it is adviced to use preincrement instead of postincrement: > > for (int i = 0; i < datetmp_len; ++i) { > Forget my ignorance, I have read the

Re: new command: date-insert

2000-02-03 Thread Michael Meskes
On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: > | + for (int i = 0; i < datetmp_len; i++) { > > In C++ it is adviced to use preincrement instead of postincrement: Could anyone please enlighten me and tell me why preincrement is preferred over postincrement? Michael

Re: new command: date-insert

2000-02-03 Thread Andre Poenitz
> > On Thu, Feb 03, 2000 at 03:58:02PM +0100, Lars Gullik Bjønnes wrote: > > | + for (int i = 0; i < datetmp_len; i++) { > > > > In C++ it is adviced to use preincrement instead of postincrement: > > Could anyone please enlighten me and tell me why preincrement is preferred > over

RE: new command: date-insert

2000-02-01 Thread Juergen Vigna
command: date-insert. I wrote this b/c I'm currently co-authoring a book, and I and my partner critique each other's work by writing margin notes into the text. We enter the date at the top of each comment, which quickly became tedious. This new command accepts a strftime formatting string

Re: new command: date-insert

2000-02-01 Thread Juergen Vigna
On 01-Feb-2000 Andre Poenitz wrote: Your editor is broken. It obviously failed to show you lines 26 and 27 when you worked on LyXAction.C :-) Now I see it, my editor really had the function hide-file-comment-for- how-to-know-to-do-things enabled so I didn't see that lines #:O) PS:

Re: new command: date-insert

2000-02-01 Thread John D. Blair
Andre Poenitz wrote: 4. Changed the command from date-insert to insert-date (could someone tell me if this is right I don't know in what direction the commands should be and a look at LyXAction reveals that there are insert_xxx and xxx_insert commands around, so what???)

RE: new command: date-insert

2000-02-01 Thread Juergen Vigna
to implement a simple new command: > date-insert. I wrote this b/c I'm currently co-authoring a book, and I > and my partner critique each other's work by writing margin notes into > the text. We enter the date at the top of each comment, which quickly > became tedious. > &

Re: new command: date-insert

2000-02-01 Thread Juergen Vigna
On 01-Feb-2000 Andre Poenitz wrote: > > Your editor is broken. It obviously failed to show you lines 26 and > 27 when you worked on LyXAction.C :-) Now I see it, my editor really had the function hide-file-comment-for- how-to-know-to-do-things enabled so I didn't see that lines #:O) > PS: >

Re: new command: date-insert

2000-02-01 Thread John D. Blair
Andre Poenitz wrote: > > > 4. Changed the command from date-insert to insert-date (could someone tell > >me if this is right I don't know in what direction the commands should be > >and a look at LyXAction reveals that there are insert_xxx and xxx_insert > >commands around, so

new command: date-insert

2000-01-31 Thread John D. Blair
Hello, Thanks much for all of your excellent work on LyX. I'm really happy with what it can do now, and I'm looking forward to everything you're still working on. At any rate, I've attached a patch to implement a simple new command: date-insert. I wrote this b/c I'm currently co-authoring

new command: date-insert

2000-01-31 Thread John D. Blair
Hello, Thanks much for all of your excellent work on LyX. I'm really happy with what it can do now, and I'm looking forward to everything you're still working on. At any rate, I've attached a patch to implement a simple new command: date-insert. I wrote this b/c I'm currently co-authoring