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

Hynek Vychodil <>
Fri Jul 11 16:59:11 CEST 2008


{ok, File} = file:open("writebench.data.erl",
                   [write, binary, raw, {delayed_write, 1 bsl 12, 1000}]

will work :)


On Fri, Jul 11, 2008 at 4:26 PM, Caspar Florian Ebeling <
> wrote:

> I'm really a bit confused about cases when it is not possible to
> 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}]
>
> but this does,
>
>    {ok, File} = file:open("writebench.data.erl",
>                           [write, binary, raw, {delayed_write, 65536,
> 1000}]
>
> Shouldn't that evaluate to exactly the same thing?
>
> Florian
>
> --
> Florian Ebeling
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



-- 
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080711/56bfa5ac/attachment.html>


More information about the erlang-questions mailing list