#!/bin/ch
/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <stdio.h>
#include <stdarg.h>

typedef struct {int i1; double d1; char c1; float f1;} SS1;
void func(int, ...);
void vfunc(int, va_list ap);

int main() {
    char    c1 = 'c';
    int     i1 = 10;
    short   s1 = 20;
    float   f1 = 30;
    double  d1 = 65536;
    double  *pd1 = &d1;       /* pointer to double */
    double  **ppd1 = &pd1;    /* pointer to double */
    float   af1[3][4];         /* array */
    SS1     ss1;              /* struct */
    int     i2 = 50;
    double  d2 = 50;

    ss1.i1 = 10;
    ss1.d1 = 65536;
    ss1.c1 = 'c';
    ss1.f1 = 65536;

    af1[1][1] = 456;

    func(0, c1, i1, s1, f1, d1, pd1, ppd1, af1, ss1, i2);
/*
    func(0, c1, i1, s1, f1, d1, pd1, ppd1, af1, ss1, d2);
*/
    return 0;
}

/** output from executing this program **
The first argument is 0

c1 = c
i1 = 10
s1 = 20
f1 = 30.000000
d1 = 65536.000000

*pd1 = 65536.000000
**ppd1 = 65536.000000
af1[1][1] = 456.000000

ss1.i1 = 10
ss1.d1 = 65536.000000
ss1.c1 = c
ss1.f1 = 65536.000000

d2 = 50.00000

*******/
