Yurttas/PL/SL/perl/F/03/01/01/comp 01.pl

Revision as of 18:57, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="perl" line start="1" enclose="div"># # Copyright(C) 1998 # All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. # # Pe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 1# 
 2#  Copyright(C) 1998
 3#  All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4#
 5#  Permission from use, copy, modify, and distribute this
 6#  software and its documentation for EDUCATIONAL purposes
 7#  and without fee is hereby granted provided that this
 8#  copyright notice appears in all copies.
 9#
10#  date   : January 1, 1998.
11#  author : Salih Yurttas.
12#
13#  comp_01.pl
14#
15
16
17sub f_a {
18  print "--> a : ";
19  chomp($a=<STDIN>);     
20  $a = $a + @_[0];
21  print "a = ", $a;
22  print "\n";
23}
24
25sub f_b {
26  print "--> b : ";
27  chomp($b=<STDIN>);     
28  $b = $b + @_[0];
29  print "b = ", $b;
30  print "\n";
31}
32
33# some computations...
34
35f_a(2);
36
37# some more computations...
38
39f_a(4);
40
41# some more computations...
42
43f_b(4);
44
45# some more computations...
46
47f_b(2);