delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/31/17:35:58

Message-ID: <368BFC31.A64BB44@lycosmail.com>
Date: Thu, 31 Dec 1998 17:35:29 -0500
From: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
X-Mailer: Mozilla 4.5 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Alex Lowe <ayin AT immediate DOT net>
CC: djgpp AT delorie DOT com
Subject: Re: 'with' equvalent
References: <368BF2D5 DOT E057F369 AT immediate DOT net>
Reply-To: djgpp AT delorie DOT com

This probably doesn't answer this q, but I think that it was an option in
Turbo Pascal. It is possible that I saw this in my C++ book, not my Pascal
book (Same publisher), but I don't think so. Still, it is quite likely.
Also, check comp.lang.c and comp.lang.c++.

Alex Lowe wrote:

> This is more a non-DJGPP specific question... but...
>
> If any of you are familiar with VB there is a 'with' and 'end with'
> statement.
>
> It's purpose is to access members of the same declared class with less
> typing. For example:
>
> INSTEAD OF (this is VB example code, but is easy to follow):
>
> foo.bar=3
> foo.test=5
> foo.etc=4
>
> THERE WOULD BE:
>
> with foo
>         bar=3
>         test=5
>         etc=4
> end with
>
> Is there an equivalent in C or C++ to do this?
>
> Thanks in advance.
>
> -- Alex
> ayin AT immediate DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019