Is it possible to build a capitalized Control Sequence from an argument of lowercase string and to give it a definition? I tested two codes, but both didn't work well.
code1:
\def\makecs#1#2{%
\expandafter\def\csname \uppercase{#1}\endcsname{#2}
}
\makecs{macroname}{definition}
\MACRONAME
code2:
\def\makeCS#1#2{%
\expandafter\def\uppercase{\csname #1\endcsname}{#2}
}
\makeCS{macro}{def}
\MACRO
Now I understand why they didn't work well, but I have no ideas for alternative solution. What should I do to build a capitalized Control Sequence from an argument of lowercase string and to give it a definition?