86609119e3
* scaffold/tests/06-call-not-1.c: Rename from 06-call-!1.c. * scaffold/tests/06-not-call-1.c: Rename from 06-!call-1.c. * scaffold/tests/12-if-eq.c: Rename from 12-if-==.c. * scaffold/tests/13-if-neq.c: Rename from 13-if-!=.c. * scaffold/tests/15-if-not-f.c: Rename from 15-if-!f.c. * scaffold/tests/21-char-array-simple.c: Rename from 21-char[]-simple.c. * scaffold/tests/21-char-array.c: Rename from 21-char[].c. * scaffold/tests/22-while-char-array.c: Rename from 22-while-char[].c. * scaffold/tests/41-ternary.c: Rename from 41-?.c. * scaffold/tests/7u-call-ternary.c: Rename from 7u-call-?.c. * scaffold/tests/7u-ternary-expression.c: Rename from 7u-?-expression.c. * build-aux/check-mescc.sh (tests): Update.
37 lines
1,011 B
C
37 lines
1,011 B
C
/* -*-comment-start: "//";comment-end:""-*-
|
|
* GNU Mes --- Maxwell Equations of Software
|
|
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
|
*
|
|
* This file is part of GNU Mes.
|
|
*
|
|
* GNU Mes is free software; you can redistribute it and/or modify it
|
|
* 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.
|
|
*
|
|
* GNU Mes is distributed in the hope that it will be useful, but
|
|
* 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
|
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
int
|
|
main ()
|
|
{
|
|
char *s = "mes";
|
|
if (!s[0])
|
|
return 1;
|
|
int f;
|
|
int v = 3;
|
|
if (!s[f])
|
|
return 2;
|
|
if (s[3])
|
|
return 3;
|
|
if (s[v])
|
|
return 4;
|
|
return 0;
|
|
}
|