Basic on UNIX - ...

mwm at ucbtopaz.CC.Berkeley.ARPA mwm at ucbtopaz.CC.Berkeley.ARPA
Fri Feb 15 17:55:51 AEST 1985


In article <401 at lsuc.UUCP> msb at lsuc.UUCP (Mark Brader) writes:
>stewart at houxf.UUCP (Bill Stewart HO 4K-435 x0705) writes:
>> While I normally disparage BASIC along with the rest of you, there are
>> a few places it's useful.  I tend to use it for jobs that take too much
>> arithmetic for shell, but are too small to bother writing in C 
>> 	FOR I = 1 TO 43
>> 		PRINT "FOO";I
>> 		NEXT I
>
>My preference would be:
>	awk </dev/null 'BEGIN {
>		for (i=1; i<=43; ++i) print "foo" i }'
>Mark Brader

Yikes! What's wrong with a nice, simple:

% bc
for (i = 0; i <= 43; i++) { "foo"; i}

Of course, for something complicated, I'll fire up a lisp, but that's anther
language.

	<mike



More information about the Comp.unix mailing list