//
you're reading...
Erlang

The v(Number) function in Erlang


Maybe, someone of you doesn’t still know about the existence of the Erlang function v(Number).
You can use this function within an Erlang shell and it will return the value for the Number-th line of the shell.
For example:

Eshell V5.6.5 (abort with ^G)
1> 2 * 2.
4
2> v(1).
4
3>

I found this function really useful many times, especially when managing with databases and records.

About these ads

About Roberto Aloi

Software Engineer and Erlanger. Author of www.tryerlang.org.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: