Skip to content

Comment on Static, Ahead of Time Compiled Juliaparent

Comments

>, beyond languages, data is often 1-based indexed.

That's a good point. Probably the most widespread data example for non-programmers is spreadsheets (MS Excel, Google Sheets). The first row[1] in the spreadsheet is labeled as "1" instead of "0". The idiomatic Visual Basic programming code to loop through the rows would look something like:

  For Each cell In Range("a1:a25")  ' not "a0:a24"
      ' do work
  Next cell
[1]https://www.google.com/search?q=microsoft+excel+spreadsheet+...
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.