Answer the question
In order to leave comments, you need to log in
In what type of variable to store (m\f) sex?
In what type of variable to store floor, bool, enum (enumeration), other options? And why?
I write in C# and it seems that you can easily use boolean :) But I consulted with an experienced 1C nickname, and he says that in no case !!! That in 1C both gender and Legal Person\Physical Person and other similar parameters are enumerations of 2 values. But isn't it easier: bool isWoman = true (or false) ;
???
In advance, thanks to everyone who adequately answers!
Answer the question
In order to leave comments, you need to log in
IMHO, it's wasteful to make a separate table under the floor. Perfect (if you do not go into the wilds of human deviations):
enum Sex {
Male,
Female,
Undefined
}
bool?
- also an option, but it reads worse.
Due to the craziness of today's society, it's better to store "gender" as an int and use a separate table for the values.
1C nickname told you correctly - for such cases, enumerations are used in 1C. This makes it easier to follow. You don't have to figure out who is who - a man or a woman.
how does facebook
www.independent.ie/business/technology/facebook-ad...
soon and inta may become small =)
For flexibility (and according to Sharp's ideology), it can be made into a structure that encapsulates this Int32 / Nullable / Enum, etc., capable of converting from different representations, issuing localized gender names, serialization, and other useful things.
The international standard ISO 5218 describes the representation of human sexes. It can be used in information systems and databases.
The 4 codes defined in the standard specification look like:
0 - unknown
1 - male
2 - female
9 - not applicable
https://ru.wikipedia.org/wiki/ISO_5218
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question