Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #7225

Re: How setting enumerator in cavo code

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Uwe Heyer" <uwe.heyer@aristik.de>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: How setting enumerator in cavo code
Date 21 Sep 2014 23:49:26 GMT
Lines 56
Message-ID <c896g6F41apU1@mid.individual.net> (permalink)
References <lvmpum$7fr$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
X-Trace individual.net 8DH35Rk5o2D7nOlJuz+aCga2vgZO9diGi4c6xKa6Up2zInyxGt
Cancel-Lock sha1:rjm+45WG/oeQzOgIJP7aLs4fhtM=
User-Agent XanaNews/1.18.1.6
Xref csiph.com comp.lang.clipper.visual-objects:7225

Show key headers only | View raw


> My problem is how to set an enumerator into a structure
> 
> In WinAPI they say:
> typedef enum _STORAGE_BUS_TYPE {

Hi Jean,

an enum isn't a structure. It is an integer for VO.
This INT can hold one and only one value of the underlying members.
(see it like a UNION of INT's)

e.g.

typeded enum WEEK
{
	Sunday = 1, // assigned first value, or zero if nothing assigned
	Monday,	 // +1
     other days, // +1, or new value assigned
     Saturday    // +1 == 7
}


For one another language you can code something like

WEEK day;

day can hold the enum value from 1 to 7, nothing more



day = GetDayOfWeek(Date());  // return enum 2 
if ( day == Monday )
	doThis();

VO Code
day = GetDayOfWeek(Date());  // return 2 
if day = 2 
	doThis()

endif


Ahoj
-Uwe











 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How setting enumerator in cavo code <jean_ray67@hotmail.com> - 2014-09-21 11:13 -0400
  Re: How setting enumerator in cavo code "Uwe Heyer" <uwe.heyer@aristik.de> - 2014-09-21 23:49 +0000
    Re: How setting enumerator in cavo code "Uwe Heyer" <uwe.heyer@aristik.de> - 2014-09-22 00:18 +0000
    Re: How setting enumerator in cavo code <jean_ray67@hotmail.com> - 2014-09-21 23:52 -0400
      Re: How setting enumerator in cavo code "Uwe Heyer" <uwe.heyer@aristik.de> - 2014-09-22 15:32 +0000
  Re: How setting enumerator in cavo code Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2014-09-22 10:19 +0100

csiph-web