Question about 'if'

Marc van Woerkom Marc.Vanwoerkom@REDACTED
Wed Jun 9 10:52:31 CEST 2004


>The natural erlang way (in my mind) was to do a parse
>transformation to a record like this:
>
>-record icode(linenum, label, opcode, args, original).
>
>genCode(Text, LineNum) ->
>	[Label, Operator | Args] = parseText(Text),
>	ICode = #icode(linenum=LineNum, label=Label, 
>opcode=opToken(Operator),
>			args=Args, original=Text}.
>
>opToken("Move") -> move;   % or even fun(Arglist) -> 

Interesting, thank you for that hint!

Regards,
Marc



More information about the erlang-questions mailing list