[erlang-questions] Construct parameter dynamically, sometimes illegal?

Caspar Florian Ebeling florian.ebeling@REDACTED
Fri Jul 11 16:49:26 CEST 2008

> | pass parameters which were created dynamically. An example:
> | this does not work,
> |
> |     {ok, File} = file:open("writebench.data.erl",
> |                [write, binary, raw, {delayed_write, math:pow(2, 12),
> 1000}]
> math:pow(Int) -> Float, so that will be the wrong type for that function, if
> you have a function that returns an int I am sure it will work, or if you
> surround it in a round or trunc it will work fine.

oh, of course, you're right. Thanks.


Florian Ebeling

More information about the erlang-questions mailing list