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

From: Alex Lowe <ayin AT immediate DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: 'with' equvalent
Date: Thu, 31 Dec 1998 13:55:33 -0800
Organization: TempleCRC
Lines: 28
Message-ID: <368BF2D5.E057F369@immediate.net>
NNTP-Posting-Host: p105.stk1.2xtreme.net
Mime-Version: 1.0
X-Mailer: Mozilla 4.5 [en] (Win98; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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