SPUG:Re: Best One-Liners and Scripts for UNIX

Scott Blachowicz scott+spug at mail.dsab.rresearch.com
Fri Apr 18 16:45:15 CDT 2003


Brian Hatch <spug at ifokr.org> wrote:

> Out of curiousity, what languages are zero based vs one based?
> Perl is zero based (unless you use '$[ =3D 1')
> 
> Zero based:
> 	C, C++, Perl, Python[1] ...
> 
> One based:
> 	Fortran, awk, Perl[2]

Also, IIRC PASCAL is one-based. (I'd imagine that other languages would be
doing the same thing...e.g. Modula? Ada?)

Scott



More information about the spug-list mailing list