add ../examples/multi_retvals.c
authoryu.dongliang <18588496441@163.com>
Fri, 10 Feb 2023 04:08:09 +0000 (12:08 +0800)
committeryu.dongliang <18588496441@163.com>
Fri, 10 Feb 2023 04:08:09 +0000 (12:08 +0800)
examples/multi_retvals.c [new file with mode: 0644]

diff --git a/examples/multi_retvals.c b/examples/multi_retvals.c
new file mode 100644 (file)
index 0000000..b888742
--- /dev/null
@@ -0,0 +1,19 @@
+int printf(const char* fmt, ...);
+
+int, int ret3value(int i, int j, int k)
+{
+       return i, j;
+}
+
+int main()
+{
+       int a, b, c;
+
+       a, b = ret3value(1, 2, 3);
+
+       printf("%d, %d\n", a, b);
+//     printf("%d, %d, %d\n", ret3value(1, 2, 3));
+
+       return 0;
+}
+