๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi
Article #334851

Re: [outro] ]Re: Delphi do zastosowan domowych

#334851
From: Wojciech "Spook" Sura
Date: Thu, 19 Jan 2012 17:48
41 lines
2005 bytes
Dnia 19.01.2012 o 18:33 R.e.m.e.K <go@dev.null> napisaล‚(a):

> A jeszcze moze dodam ciekawa rzecz, tym "mykiem" mozna zrobic cos czego
> klamerki z C++ nie dadza:
>
> var
>  SL : TStringList;
> begin
>  SL := GetStringListWithContent;
>  result := 'Zawartosc listy: [' +
>     (function (Str : TStrings) : string
>      var
>       s : string;
>      begin
>       for s in Str do s := s + CRLF;
>       result := s;
>      end;
>     )(SL) + ']';
>  SL.Free;
> end;

{
     std::vector<std::string > & SL = GetStringListWithContent();

     auto result = [&SL]() -> std::string
     {
         std::string tmp;
         for (int i = 0; i < SL.size(); i++)
             tmp += (SL[i] + "\n");
         return tmp;
     }();
}

Pozdrawiam -- Spook.

-- 
! ._______. Warning: Lucida Console sig!    //)    !
! || spk ||    www.spook.freshsite.pl      / _ """*!
! ||_____||        spook at op.pl         / '  | ""!
! |  ___  |   tlen: spoko_ws gg:1290136  /. __/"\ '!
! |_|[]_|_|  May the SOURCE be with you! \/)     \ !
Technical Details
Message-ID: <op.v8cee3coyumhbd@notebook.asus>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <1nva6kty8t73b$.dlg@hell.heaven> <jf99kg$t6e$1@news.dialog.net.pl> <162t4ulo0stz4.dlg@hell.heaven>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "Wojciech \"Spook\" Sura" <spook.no@spamming.op.pl>
Newsgroups: pl.comp.lang.delphi
Subject: Re: [outro] ]Re: Delphi do zastosowan domowych
Date: Thu, 19 Jan 2012 18:48:29 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 43
Message-ID: <op.v8cee3coyumhbd@notebook.asus>
References: <1nva6kty8t73b$.dlg@hell.heaven> <jf99kg$t6e$1@news.dialog.net.pl> <162t4ulo0stz4.dlg@hell.heaven>
NNTP-Posting-Host: 89-76-141-48.dynamic.chello.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1326995298 28052 89.76.141.48 (19 Jan 2012 17:48:18 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 19 Jan 2012 17:48:18 +0000 (UTC)
X-User: spoko_ws
X-Antivirus: avast! (VPS 120119-1, 2012-01-19), Outbound message
X-Antivirus-Status: Clean
User-Agent: Opera Mail/11.60 (Win32)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit