Before 2016:if(sex=="M")
gender = "man";
else gender = "woman";
After 2016:switch(sex) {
case 1: title = "man";
break;
case 2: title = "woman";
break;
case 3: title = "demikinsexunidimension genderless-genderfluid dragon";
break;
case 4: title = "Male to female to male to female transgender transpecies genderqueer agender";
break;
.
.
.
case 38182182831: title = "dog-kin";
break;
}
Just store the gender as a string or just don't ask at all because if it's nothing for legal purposes then why the fuck do you even need to know
>>57514473
>implying there are a finite amount of genders
o_O
>>57514501
I can't. I am at my job and we have a list of clients stored in SQL with their genders and I was coding this:If fp_rs_resultado.Item("sexo_rep") = "M" Then
WordDoc.Variables("sexo").Value = "varĂ³n"
Else
WordDoc.Variables("sexo").Value = "mujer"
End If
And it got me thinking about how I could know that if the person is not male then I could assume they are a woman, but in the future I will not. I will have to change this code to a switch statement with a billion cases.
And the database stores the genders as single characters, maybe for practical reasons and then from that our applications transform to male,female,man,woman, etc. depending on context. This is for a legal contract.
>>57514536
>I will have to change this code to a switch statement with a billion cases.
Holy shit pajeet this is why we have hash tables.
>>57514536
>Programming in anything but English
>>57514598
>Holy shit pajeet this is why we have hash tables.
Sure, I guess. Sorry for not optimizing a problem I don't already have and I am just joking about.
Fuck, autism speaks.
>>57514619
This for spanish speaking clients. It is in particular creating a word document meant to be read by spanish speakers.
>>57514473enum gender_identity {
SEX_MALE,
SEX_OTHER
};
You can't go wrong, op.
>>57514473
sex = gender
simply ebin