Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

"for .. in" (Announce)

posted by Rugxulo Homepage, Usono, 24.11.2010, 01:08

> * Delphi 2006 like for..in support

Okay, I pretty much guessed what this was for. I assume this is similar to OORexx's [do] "over". Of course, here's what I really found funny, which even marcov must be aware of:


[ WinXP ] Tue 11/23/2010> type hello.pas
program hello;
var c: char;
begin
for c in ['a','e','i','o','u'] do writeln(c)
end.

[ WinXP ] Tue 11/23/2010> fpc hello.pas
Free Pascal Compiler version 2.4.2 [2010/11/09] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: GO32 V2 DOS extender
Compiling hello.pas
Linking hello.exe
5 lines compiled, 1.3 sec

[ WinXP ] Tue 11/23/2010> hello
a
e
i
o
u

[ WinXP ] Tue 11/23/2010> for %c in (a e i o u) do @echo %c
a
e
i
o
u


DOS lives! :rotfl:

EDIT: Barely surprising that someone else had almost the same lame test code as me. And surely there are better uses for this feature, heh.

 

Complete thread:

Back to the forum
Board view  Mix view
22781 Postings in 2123 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum