Deutsch   English   Français   Italiano  
<6800fa70$0$709$14726298@news.sunsite.dk>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 17 Apr 2025 08:56:17 -0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Clair Grant on VMS code base
Newsgroups: comp.os.vms
References: <vsh5m5$3is6e$1@dont-email.me> <vtj025$18n4d$1@dont-email.me>
 <vtj2tu$1cfo8$1@dont-email.me> <67fee5b8$0$708$14726298@news.sunsite.dk>
 <vtplin$9us$2@reader1.panix.com> <m6ca1qF8fe6U1@mid.individual.net>
 <vtqtdq$lmr6$1@dont-email.me>
Content-Language: en-US
From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk>
In-Reply-To: <vtqtdq$lmr6$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 68
Message-ID: <6800fa70$0$709$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 4e93a16d.news.sunsite.dk
X-Trace: 1744894576 news.sunsite.dk 709 arne@vajhoej.dk/68.14.27.188:52227
X-Complaints-To: staff@sunsite.dk
Bytes: 2418

On 4/17/2025 8:50 AM, Simon Clubley wrote:
> On 2025-04-17, bill <bill.gunshannon@gmail.com> wrote:
>> On 4/16/2025 9:29 PM, Dan Cross wrote:
>>> Most modern code-counting tools _are_ language aware.  Whether
>>> they do a better or worse job for each given language may be a
>>> matter of debate, but most at least recognize different
>>> languages and have some knowledge of their semantics.
>>>
>> I wonder how they would handle BASIC?  :-)
>>
>> 10 FOR X = 1 TO 10
>> 20 PRINT X
>> 30 NEXT X
>>
>> 10 FOR X = 1 TO 10:PRINT X:NEXT X
>>
>> Is the snippet above one line of code or three?
> 
> 3 lines of code.

Other replies cover what the tools actually does.

If we discuss what is the "right" answer, then I would
actually say 2.

for i := 1 to 10 do writeln(i)

for i := 1 to 10 do
    writeln(i)

for i := 1 to 10 do begin
    writeln(i)
end;

for i := 1 to 10 do
begin
    writeln(i)
end;

for(i = 1; i <= 10; i++) printf("%d\n", i);

for(i = 1; i <= 10; i++)
     printf("%d\n", i);

for(i = 1; i <= 10; i++) {
     printf("%d\n", i);
}

for(i = 1; i <= 10; i++)
{
     printf("%d\n", i);
}

I would say 2 for all.

And unless Basic next has some subtle functionality I am not
aware of then I would say 2 for Basic as well.

Arne