File: math.inc

package info (click to toggle)
shunit2 2.1.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: sh: 1,752; makefile: 15
file content (17 lines) | stat: -rw-r--r-- 149 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# available as examples/math.inc

add_generic()
{
  num_a=$1
  num_b=$2

  expr $1 + $2
}

add_bash()
{
  num_a=$1
  num_b=$2

  echo $(($1 + $2))
}