[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Function definition syntax inconsistencies

From: Jan Schampera
Subject: Function definition syntax inconsistencies
Date: Thu, 05 Jun 2008 06:31:36 +0200
User-agent: IceDove (X11/20080509)

Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib
  -g -O2
uname output: Linux mainserver 2.6.18-6-486 #1 Sat May 24 09:50:27 UTC
2008 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

        The function definition is allowed in 3 forms:
        1. NAME() ...
        2. function NAME() ...
        3. function NAME ...

        The 3rd form can't be used when specifying an explicit subshell
        as body.

        I don't have a non-Debian system at hand to test it
        but I don't think Debian patches are applies in this area. Also
        I don't have a higher Patchlevel here to test, sorry.

        Definition of the following functions works:
        - somename() (echo)
        - function somename() (echo)

        This definition fails:
        - function somename (echo)

        No fix, just a guess: It might be the code or part that
        parses/awaits the optional "()".

This is my life - this is my net!
- Jan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]