From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4a9672c174a7c9bf,start X-Google-Attributes: gid103376,public From: fmanning@netmedia.com Subject: For loop step size Date: 1998/08/07 Message-ID: <6qfvjl$v2e$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 378950586 X-Http-Proxy: 1.0 PROVIDER Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Aug 07 22:37:41 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.0; Windows 95) Date: 1998-08-07T00:00:00+00:00 List-Id: 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