On 4 Nov 2010, at 11:05, Tony Firshman wrote:

> gdgqler wrote, on 04/11/2010 10:52:
>> 
>> On 4 Nov 2010, at 10:44, gdgqler wrote:
>> 
>>> My S*BASIC program is:
>>> 
>>> 10 CLS:FOR x=1 to 100:PRINT x&isit$(3,"FIZZ")&isit$(5,"BUZZ"):PAUSE 5
>>> 20 DEFine FuNction isit$(m%,a$)
>>> 30  IF (x MOD m%):RETRurn "":ELSE:RETurn a$
>>> 40 END vDEFine
>>> 
>> 
>> This will work better if you replace RETRurn by RETurn (which is what I had 
>> in the  QPC2 program).
> (8-)#
> Very neat indeed.
> 
> What is 'vDEFine'?
> 

vot i type is vot i get

> Tidier is:
> PRINT x&" "&isit$(3,"FIZZ")&isit$(5,"BUZZ")

Of course it is. But was that asked for? I suggest not since you were asked to 
print FIZZ or FIZZBUZZ (without a space between FIZZes and BUZZes) and were 
asked to print these after the number, not after a space after the number.

Is it better to be neat than correct? Is it better to program what is requested 
or something more elegant?

Personally I always used to listen to what the user asked for and then gave 
them what they really needed.

George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to