[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-patches] [patch #3764] Improvement to variable interpolation
From: |
Isaac Dupree |
Subject: |
[Wesnoth-patches] [patch #3764] Improvement to variable interpolation |
Date: |
Wed, 23 Feb 2005 17:52:13 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041201 Camino/0.8.2 |
URL:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=3764>
Summary: Improvement to variable interpolation
Project: Battle for Wesnoth
Submitted by: invisibleph
Submitted on: Wed 02/23/2005 at 17:52
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
Details:
Hopefully deserves to be simpler than the preprocessor :)
At first I was annoyed that things like this didn't work:
[set_variable]
name=foo
format=$array[$i].x
[/set_variable]
Arrays were not handled properly in it. (Using to_variable and if necessary
multiple [set_variable] tags can get the desired result, but it's
unnecessarily clumsy.)
Anyway I rewrote the algorithm and I can't imagine any situation where it
would be wrong, except possibly one, when there are two variables next to
each other. Even in that, there just has to be a pipe (|) character in one
place:
[set_variable]
name=bar
format=$var1|$var2 #not $var1$var2
[/set_variable]
However I did a search and I do not believe such a pattern of two variables
being used adjacent to each other has ever been used. Almost always some
other character is put between two variables' usages. And if it's really
desired to do so, it's as simple as putting a pipe character in between.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 02/23/2005 at 17:52 Name: string_utils_cpp.diff Size: 5.15KB
By: invisibleph
Hooray for string utils having been separated into a separate file
<http://savannah.nongnu.org/patch/download.php?item_id=3764&item_file_id=4221>
_______________________________________________________
This item URL is:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=3764>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Wesnoth-patches] [patch #3764] Improvement to variable interpolation,
Isaac Dupree <=