Define binary(n) = str | ... %Definewhere the ... part is replaced by statements that define str. You will need an If-statement. You might want to write open in front of If so that definitions made inside the If-statement are available outside of the If-statement.