* For loop step size
@ 1998-08-07 0:00 fmanning
0 siblings, 0 replies; only message in thread
From: fmanning @ 1998-08-07 0:00 UTC (permalink / raw)
Concerning the restriction on step sizes in for-loops -- I'm writing a
Basic compiler for a small 8-bit microcontroller. The language is a
subset of Visual Basic. Since the processor is small, time is short and
VB is big, we can only implement a small subset of the language.
Being an Ada-phile, I naturally tend to pick a subset that is as
Ada-like as possible.
For example, strong typing is used, for-next loops are restricted to
discrete types, and the step size is restricted to +/-1. The step size
restriction in particular has caused some consternation.
I read through the Jan 97 thread in cla when this subject came up, and
I think I understand the basic rationale for the Ada restriction --
that is, programmers are prone to making mistakes in getting loops
to terminate correctly if step sizes are arbitrary.
I guess my question is whether this same rationale makes sense for
a language as different as VB. Looking for ammunition...
-- Frank Manning
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-08-07 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-07 0:00 For loop step size fmanning
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox