<p>What are some syntaxes programming¹ languages have used for units?</p><p>I have a human-editable format where a human writes numbers, but might want to specify &quot;3&quot; vs &quot;3 hz&quot; vs &quot;3 samples&quot;. I want units to be string names, however</p><p>- Allowing the number to be separated from the unit by a space makes my parser hard<br />- Forcing them together, like 3hz, creates other problems, like hex support</p><p>¹ Would also be happy for syntaxes &quot;not normatively programming&quot; languages have used, like spreadsheet programs</p>
Reply