aboutsummaryrefslogtreecommitdiff
path: root/src/functionrange.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-06-03 05:51:21 +0000
committerMike Buland <eichlan@xagasoft.com>2011-06-03 05:51:21 +0000
commit4f1e5849d4a48eb674d81164ba4baba4ad51a89f (patch)
treeee590deb9b6d99a73c24ea36877039d623d9cfd3 /src/functionrange.h
parente8a57991458cfaa536fcc0d8b9a72739a8859da5 (diff)
downloadbuild-4f1e5849d4a48eb674d81164ba4baba4ad51a89f.tar.gz
build-4f1e5849d4a48eb674d81164ba4baba4ad51a89f.tar.bz2
build-4f1e5849d4a48eb674d81164ba4baba4ad51a89f.tar.xz
build-4f1e5849d4a48eb674d81164ba4baba4ad51a89f.zip
Added a range function. It works a lot like the range function in python,
if called with one parameter, it will produce a list of the numbers 1 through the number provided inclusive, if two numbers, it will produce a list of all numbers between the first and second parameter, inclusive, and if three parameters are provided it will use the last one as a step.
Diffstat (limited to '')
-rw-r--r--src/functionrange.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/functionrange.h b/src/functionrange.h
new file mode 100644
index 0000000..1f6d8c5
--- /dev/null
+++ b/src/functionrange.h
@@ -0,0 +1,17 @@
1#ifndef FUNCTION_RANGE_H
2#define FUNCTION_RANGE_H
3
4#include "function.h"
5
6class FunctionRange : public Function
7{
8public:
9 FunctionRange();
10 virtual ~FunctionRange();
11
12 virtual Bu::String getName() const;
13 virtual Variable call( Variable &input, VarList lParams );
14
15};
16
17#endif