[erlang-questions] How to decide if the type of two variables is the same record?

attila.rajmund.nohl@REDACTED attila.rajmund.nohl@REDACTED
Thu Jun 14 13:23:59 CEST 2007


Hello!

Is there a simple way to decide that the type of two variables is the
same record? I could write something like this:
case {Var1, Var2} of
   {#rec1{}, #rec1{}} -> ok;
   {#rec2{}, #rec2{}} -> ok;
   _ -> not_ok
end,

but is there something more elegant that doesn't have to updated if a
new record type can be expected?

 				Bye,NAR
-- 
"Beware of bugs in the above code; I have only proved it correct, not
  tried it."



More information about the erlang-questions mailing list