File: c-case_01-2ff47e6.stdout

package info (click to toggle)
lfortran 0.59.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 56,736 kB
  • sloc: cpp: 168,052; f90: 74,272; python: 17,537; ansic: 7,705; yacc: 2,345; sh: 1,334; fortran: 895; makefile: 37; javascript: 15
file content (52 lines) | stat: -rw-r--r-- 918 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <inttypes.h>

#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <lfortran_intrinsics.h>




// Implementations
int main(int argc, char* argv[])
{
    _lpython_set_argv(argc, argv);
    int64_t i;
    int64_t out;
    i = 4;
    if (i == 1) {
        out = 10;
        printf("%s\n","1");
    }
    else if (i == 2) {
        out = 20;
        printf("%s\n","2");
    }
    else if (i == 3) {
        out = 30;
        printf("%s\n","3");
    }
    else if (i == 4) {
        out = 40;
        printf("%s\n","4");
    }
    if (out != 40) {
        fprintf(stderr, "ERROR STOP");
        exit(1);
    }
    if (i == 1) {
        out = 11;
        printf("%s\n","1");
    }
    else if (i == 2 || i == 3 || i == 4) {
        out = 22;
        printf("%s\n","2,3,4");
    }
    if (out != 22) {
        fprintf(stderr, "ERROR STOP");
        exit(1);
    }
    return 0;
}