Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [RFC PATCH] init_techs
Home

[Freeciv-Dev] Re: [RFC PATCH] init_techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: [RFC PATCH] init_techs
From: Reinier Post <rp@xxxxxxxxxx>
Date: Mon, 24 Sep 2001 10:53:40 +0200

On Sun, Sep 23, 2001 at 09:34:56PM -0700, Arien Malec wrote:

> Again, if every callback has to parse its own string lists, some commands will
> accept "Alphabet,Iron Working" but not "Alphabet, Iron Working", some will 
> want
> the list to be enclosed in quotes, some not, some will parse down to
> (Alphabet,Iron,Working) etc. The syntax for providing a list of strings and/or
> ints is an integral part of the ruleset/command language, and shouldn't be 
> left
> to be invented by scores of different callback functions written by scores of
> different programmers.

It depends on what you mean; every callback can parse its command line
using the same standard functions.  After all the exact syntax (in
a grammatical sense) depends on the command.

> If we decide to go the untyped approach then we should at least provide four
> parsing functions that return int, char *, int *, and char ** and standardize
> syntax & error handling. I still think this is something that the framework
> should provide.

It would be better to type it.  There aren't all that many different types
of words in command lines, and there aren't that many ways to combine them.

-- 
Reinier


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