From 069fe15452aa33440aff5e770c169bd3612d7646 Mon Sep 17 00:00:00 2001 From: Derek Brown Date: Thu, 20 Nov 2014 13:46:42 -0500 Subject: Fix spelling and grammar --- system/doc/getting_started/seq_prog.xml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'system/doc/getting_started/seq_prog.xml') diff --git a/system/doc/getting_started/seq_prog.xml b/system/doc/getting_started/seq_prog.xml index fd49102263..be43e8d896 100644 --- a/system/doc/getting_started/seq_prog.xml +++ b/system/doc/getting_started/seq_prog.xml @@ -31,14 +31,14 @@
The Erlang Shell -

Most operating systems have a command interpreter or shell, Unix - and Linux have many, Windows has the Command Prompt. Erlang has +

Most operating systems have a command interpreter or shell- Unix + and Linux have many, while Windows has the Command Prompt. Erlang has its own shell where you can directly write bits of Erlang code and evaluate (run) them to see what happens (see shell(3)). Start the Erlang shell (in Linux or UNIX) by starting a shell or command interpreter in your operating system and typing - erl, you will see something like this.

+ erl. You will see something like this.

 % erl
 Erlang R15B (erts-5.9.1) [source] [smp:8:8] [rq:8] [async-threads:0] [hipe] [kernel-poll:false]
@@ -481,7 +481,7 @@ blue(#{blue := SV, alpha := SA}, #{blue := DV, alpha := DA}) ->
 > color:blend(C2,C1).
 #{alpha => 1.0,blue => 0.38,green => 0.52,red => 0.51}
 
-

This example warrant some explanation:

+

This example warrants some explanation:

-define(is_channel(V), (is_float(V) andalso V >= 0.0 andalso V =< 1.0)).

@@ -1152,13 +1152,13 @@ month_length(Year, Month) ->

Built In Functions (BIFs) -

Built in functions BIFs are functions which for some reason is +

Built in functions (BIFs) are functions which for some reason are built in to the Erlang virtual machine. BIFs often implement functionality that is impossible to implement in Erlang or is too inefficient to implement in Erlang. Some BIFs can be called - by use of the function name only but they are by default belonging - to the erlang module so for example the call to the BIF trunc - below is equivalent with a call to erlang:trunc.

+ by use of the function name only, but they by default belong + to the erlang module. So for example, the call to the BIF trunc + below is equivalent to a call to erlang:trunc.

As you can see, we first find out if a year is leap or not. If a year is divisible by 400, it is a leap year. To find this out we first divide the year by 400 and use the built in function @@ -1175,14 +1175,14 @@ trunc(5.01) = 5 2000 / 400 = 5.0 trunc(5.0) = 5 5 * 400 = 2000 -

so we have a leap year. The next two tests if the year is - divisible by 100 or 4 are done in the same way. The first - if returns leap or not_leap which lands up +

so we have a leap year. The next two tests, which check if the year is + divisible by 100 or 4, are done in the same way. The first + if returns leap or not_leap which ends up in the variable Leap. We use this variable in the guard for feb in the following case which tells us how long the month is.

-

This example showed the use of trunc, an easier way would - be to use the Erlang operator rem which gives the remainder +

This example showed the use of trunc. An easier way would + be to use the Erlang operator rem, which gives the remainder after division. For example:

 74> 2004 rem 400.
-- 
cgit v1.2.3