Path: news.cs.au.dk!not-for-mail From: Flemming Gram Christensen Newsgroups: comp.lang.beta Subject: Re: One letter names - oh no. Date: 26 Mar 2000 14:56:32 +0200 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 55 Message-ID: References: <8asq3a$cje7t$1@xinwen.cs.au.dk> NNTP-Posting-Host: ull.mjolner.dk X-Trace: xinwen.cs.au.dk 954075394 14397716 255.255.255.255 (26 Mar 2000 12:56:34 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 26 Mar 2000 12:56:34 GMT X-Newsreader: Gnus v5.7/Emacs 20.4 Xref: news.cs.au.dk comp.lang.beta:12275 "Kasper Østerbye" writes: > A few places in the libraries one letter names are used to make things > brief. > putFormat from formatio is a good example, where a large number if one > letter > names are used. > > Normally this is not a problem, though I occasionally run into the problem > of having a variable named e of type integer, and I will do something like > > 'This is the current value: %i of the attribute: %s' -> putFormat(# e->i; > attr->s #) > > Which gives me the cryptic message that I cannot assign my e to i. > > Lesson: I no longer uses one letter names. > > However, I was scanning a dictionary where the elements and keys were both > text > > dic.scanAssociations(# do 'Key: %s is mapped to: %s'-> putFormat(# do k->s; > e->s#) #) > > Guess what :-) > > Lesson: Someone else should reconsidder the usage of one letter names. Putformat normally makes me swear once a day: (for i:r.range repeat 'r[%d] = %s'->putformat(# do i->d; r[i]->s #) for); And no, the error message does not say anything about for loops. /gram > > -- Kasper > > > > -- /Flemming Gram Christensen ------------------------------------------------------------------------ Mjolner Informatics ApS Phone: +45 86 20 20 00 Science Park Aarhus Fax: +45 86 20 12 22 Gustav Wieds Vej 10 DK-8000 Aarhus C Denmark E-mail: gram@mjolner.dk ------------------------------------------------------------------------