2018-05-12 10:03:01 +00:00
|
|
|
/* -*-comment-start: "//";comment-end:""-*-
|
2018-07-22 12:24:36 +00:00
|
|
|
* GNU Mes --- Maxwell Equations of Software
|
2018-05-12 10:03:01 +00:00
|
|
|
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
|
|
|
*
|
2018-07-22 12:24:36 +00:00
|
|
|
* This file is part of GNU Mes.
|
2018-05-12 10:03:01 +00:00
|
|
|
*
|
2018-07-22 12:24:36 +00:00
|
|
|
* GNU Mes is free software; you can redistribute it and/or modify it
|
2018-05-12 10:03:01 +00:00
|
|
|
* under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
2018-07-22 12:24:36 +00:00
|
|
|
* GNU Mes is distributed in the hope that it will be useful, but
|
2018-05-12 10:03:01 +00:00
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-22 12:24:36 +00:00
|
|
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
2018-05-12 10:03:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
char g_hello[] =
|
|
|
|
"hello\n"
|
|
|
|
"world\n"
|
|
|
|
;
|
|
|
|
|
|
|
|
char *g_hello2 =
|
|
|
|
"hello\n"
|
|
|
|
"world\n"
|
|
|
|
;
|
|
|
|
|
|
|
|
char g_hello3[] =
|
|
|
|
{
|
|
|
|
'h', 'e', 'l', 'l', 'o', '\n',
|
|
|
|
'w', 'o', 'r', 'l', 'd', '\n',
|
|
|
|
'\0',
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
int g_hello_int[] = {0, 1, 2, 3, 4, 5};
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc)
|
|
|
|
{
|
2018-08-15 16:26:55 +00:00
|
|
|
// oputs ("0:"); oputs (g_hello); oputs ("\n");
|
|
|
|
// oputs ("2:"); oputs (g_hello2); oputs ("\n");
|
|
|
|
// oputs ("3:"); oputs (g_hello3); oputs ("\n");
|
|
|
|
// if (strcmp (g_hello, g_hello2))
|
|
|
|
// return 1;
|
|
|
|
|
|
|
|
// if (strcmp (g_hello, g_hello3))
|
|
|
|
// return 2;
|
|
|
|
|
|
|
|
// char hello[] =
|
|
|
|
// "hello\n"
|
|
|
|
// "world\n"
|
|
|
|
// ;
|
|
|
|
|
|
|
|
// char *hello2 =
|
|
|
|
// "hello\n"
|
|
|
|
// "world\n"
|
|
|
|
// ;
|
|
|
|
|
|
|
|
// oputs (hello);
|
|
|
|
// oputs (hello2);
|
|
|
|
// if (strcmp (hello, hello2))
|
|
|
|
// return 3;
|
|
|
|
|
|
|
|
// char hello3[] =
|
|
|
|
// {
|
|
|
|
// 'h', 'e', 'l', 'l', 'o', '\n',
|
|
|
|
// 'w', 'o', 'r', 'l', 'd', '\n',
|
|
|
|
// '\0',
|
|
|
|
// }
|
|
|
|
// ;
|
|
|
|
|
|
|
|
// oputs (hello3);
|
|
|
|
// if (strcmp (hello, hello3))
|
|
|
|
// return 4;
|
|
|
|
|
|
|
|
// if (g_hello_int[0])
|
|
|
|
// return 5;
|
2018-05-12 10:03:01 +00:00
|
|
|
|
|
|
|
if (g_hello_int[1] != 1)
|
|
|
|
return 6;
|
|
|
|
|
2018-08-15 16:26:55 +00:00
|
|
|
// int hello_int[] = {0, 1, 2, 3, 4, 5};
|
|
|
|
// if (hello_int[0])
|
|
|
|
// return 7;
|
2018-05-12 10:03:01 +00:00
|
|
|
|
2018-08-15 16:26:55 +00:00
|
|
|
// if (hello_int[1] != 1)
|
|
|
|
// return 8;
|
2018-05-12 10:03:01 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|