| Author |
Message |
|
| etxuwig at etxb.ericsson. |
Posted: Mon Feb 24, 2003 6:29 pm |
|
|
|
Guest
|
I've attached a diff to file.erl in kernel-2.8.1 that adds
the following functions for evaluating scripts (and being
able to capture a return value -- something file:eval/1 will
not let you do.)
/Uffe
script(File) ->
{ok, ReturnValue} | {error, Reason}
evaluates the expressions in File. Returns the result of
the last expression. The expressions can create bindings
to be reused in following expressions, just like in the
Erlang shell.
script(File, Bindings) ->
{ok, ReturnValue} | {error, Reason}
Like script/1, but with predefined bindings. Use the
functions in erl_eval.erl to manage bindings.
path_script(Path, File [, Bindings]) ->
{ok, ReturnValue, Fullname} | {error, Reason}
Analogous to path_eval/2, but for script/[2,3] above.
Example, using two "script" files:
eval1.txt:
----------
Cwd = fun() ->
{ok,D} = file:get_cwd(),
D
end,
[{cwd, Cwd()}].
eval2.txt: (assuming that the variable Var is bound)
----------
Cwd = fun() ->
{ok,D} = file:get_cwd(),
D
end,
[{var, Var},
{cwd, Cwd()}].
erl -boot start_clean -pa ../ebin -nostick
Erlang (BEAM) emulator version 5.2.3.1 [hipe] [threads:0]
Eshell V5.2.3.1 (abort with ^G)
1> file:script("eval1.txt").
{ok,[{cwd,"/home/etxuwig/work/erlang/open_source/contribs/mine/not_ready/builder-0.5/src"}]}
2> file:script("eval2.txt").
{error,[{7,file,{{unbound,'Var'},[{erl_eval,expr,3}]}},
{error,undefined_script}]}
3>
file:script("eval2.txt",erl_eval:add_binding('Var',the_value,erl_eval:new_bindings())).
{ok,[{var,the_value},
{cwd,"/home/etxuwig/work/erlang/open_source/contribs/mine/not_ready/builder-0.5/src"}]}
4>
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson AB, Connectivity and Control Nodes
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| cheung |
Posted: Tue Feb 21, 2012 3:31 am |
|
|
|
Guest
|
| Rick Nike Air Max 95 Santorum was Nike Air Max endorsed in the Republican presidential race by Ohio Air Max Attorney General Mike DeWine, another sign he Nike Air Max 90 is gaining ground on rival Mitt Romney.Standing next to Nike Air Max 90 Cheap Santorum yesterday on the steps of the Ohio statehouse in Columbus, DeWine said he backed Romney last October because he thought the former Massachusetts governor was the best candidate to defeat President Barack Obama. DeWine said he no longer believes that after the campaign run by Romney, Cheap Air Max 95 with support from an outside political action committee, Restore Air Max UK Our Future. “To be elected president, you have to do more than tear down your opponent; you have to give Nike Free Shoes the American people a reason to vote for you,” DeWine Nike Free 3.0 V2 said. “Rick Santorum has done that. Nike Free 3.0 V3 Sadly, Governor Romney has Nike Free 3.0 not.”The endorsement is a boost for Santorum, Nike Free Running whose Nike Free standing in the polls rose after wins in three states last Nike Free Run week. He is now leading in polls in Michigan, which holds its primary on Feb. 28, and in Ohio, one of 11 states with a contest on March 6, Super Tuesday.A victory for Santorum in Michigan, Romney’s native state, would position him as the Air Max 90 UK leading candidate among the party’s anti-abortion-rights and anti-tax activists.Republican presidential Air Max 95 candidate Nike Air Max 95 Cheap Rick Santorum said Air Max 90 he may not be from Michigan, but his Pennsylvania roots Cheap Air Max 90 make him at least Air Max 90 Trainers close to the hearts of Michiganders.As a result, he said, he offers the best chance to beat President Barack Obama in November."I've always Cheap Nike Air Max 90 run as a conservative," Santorum told a crowd of about 1,500 people packed into the Palazzo Grande banquet center in Shelby Township on Friday. "If you're looking for the candidate in this race who has been the most successful ... he happens to be here." |
|
|
| Back to top |
|
| wuji |
Posted: Mon Sep 10, 2012 9:09 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
said the "investigation is still ongoing" but confirmed facts of the crime crime [h4]replica designer *beep*[/h4] crime detailed in Colon's arrest warrant and obtained by the Miami Herald.According
the Herald, Colon met a friend, Stephany Concepcion, 26, and two two jordan 11 two other men identified only as "Big Killer" and "Crazy Dread" before
to rob Vero, an artist known to keep large amounts of cash cash cheap jordan shoes cash in his home.Conception, Vero's former employee, arrived at his house late
the night of Jan. 6, 2006. From the victim's bathroom, she called called jordan concord called Colon and told him the time was right for the robbery,
to the warrant.Conception said she heard shots fired from the other room. room. jordan 11 concords room. When she ran outside, the other men had driven off and
was alone at the scene when police arrived. She was arrested and and cheap designer *beep* and pleaded guilty to second-degree murder. She was sentenced to 15 years |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|