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

From "Uwe Heyer" <uwe.heyer@aristik.de>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: How setting enumerator in cavo code
Date 2014-09-21 23:49 +0000
Message-ID <c896g6F41apU1@mid.individual.net> (permalink)
References <lvmpum$7fr$1@dont-email.me>

Show all headers | 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