summaryrefslogtreecommitdiffstats
path: root/testsuite/parseko/foreachstmt07.stp
blob: a7a9c9b9aecb39d8b0cecd7d090d4b69d282d880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! stap -p1

# missing limit keyword but with an expression

global array

function decl()
{
    array[0] = 1    
    foreach (key in array 5)
        printf("key %d, value %d\n", key, array[key])
}