MID$ en FMSLogo

5 views
Skip to first unread message

Daniel Ajoy

unread,
Feb 1, 2010, 1:21:48 AM2/1/10
to LogoES
Esto es lo que dice David sobre la peticiᅵn de inclusiᅵn de MID$


> Comment By: David Costanzo (david_costanzo)
Date: 2010-01-31 21:13

Message:
In Logo, words (which is what other languages calls "strings") are
immutable, so they cannot be modified in-place. The second form of MID$
would have to be implemented by creating a new word that is the
concatenation of the first part of the word with the last part of the
word.

Another problem is that I cannot add a new primitive for this without
breaking backward-compatibility with programs that may define a command
with the same name. Adding it as a LogoLib routine would be safe, but
anyone can do that (you don't need to recompile Logo to write library
routines).

If performance is a concern, then I could extend FIRST, LAST, and ITEM so
that they output the N elements, instead of 1. (FIRST and LAST would take
an additional parameter, and ITEM would optionally take a two-member list,
instead of an index). That said, I'd be surprised if anyone using FMSLogo
is concerned about performance, so a library routine is probably
sufficient.


lrcvs

unread,
Feb 1, 2010, 8:45:39 AM2/1/10
to log...@googlegroups.com



De: Daniel Ajoy <da....@gmail.com>
Para: LogoES <log...@googlegroups.com>
Enviado: lun,1 febrero, 2010 07:21
Asunto: MID$ en FMSLogo

Esto es lo que dice David sobre la petición de inclusión de MID$
......................................................................
 
 Si lo dice su creador, pues sera verdad.
 
Atte.: Luis Belmonte
Saludos
 

 

Reply all
Reply to author
Forward
0 new messages