File: test.ipl

package info (click to toggle)
styx 1.7-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 13,324 kB
  • ctags: 5,329
  • sloc: ansic: 96,480; sh: 7,972; cpp: 1,572; makefile: 227; xml: 107; pascal: 15
file content (22 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Indent Test

fun test ( val )
  fun plus1 ( val )
    return val + 1
  if type(val) == "string"
    if length(val) == 0
      return 0
    let val = val + val
    return val
  else
    return plus1 ( val )

fun plus2 ( v1 v2 )
  while v1 < v2
    let v1 = v1 + 2
  return v1

# main

fun main ()
  return plus2 ( 2 20 )