ecere/sys/ECON: Fixed ECON parsing bug with : inside string
[sdk] / doc / ecere / ecere / sys / _global-defs.econ
1 {
2    name = "sys",
3    description = "Platform independent System API (Files, Multithreading, Unicode, ...)",
4    defines = [
5       {
6          "ecere::sys::Pi",
7          {
8             description = "Ratio of a circle's circumference to its diameter; Measure of a half-circle angle in radians (180°)"
9          }
10       }
11    ],
12    functions = [
13       {
14          "GetRandom",
15          {
16             description = "Returns a random integer from lo to hi inclusive.",
17             usage = "Returns a random integer, based on the Random Seed. If no Random Seed is set with RandomSeed(), then GetRandom() returns lo.",
18             example = "      int Rand;\n"
19                "      RandomSeed((uint)(GetTime() * 1000));\n"
20                "      Rand = GetRandom(1, 10);\n"
21                "      printf(\"%d\\n\", Rand);     ",
22             also = "GetTime(), RandomSeed()"
23          }
24       },
25       {
26          "GetTime",
27          {
28             description = "Returns the current system time as a Time object.",
29             example = "      int Rand;\n"
30                "      RandomSeed((uint)(GetTime() * 1000));\n"
31                "      Rand = GetRandom(1, 10);\n"
32                "      printf(\"%d\\n\", Rand);     ",
33             also = "RandomSeed()"
34          }
35       },
36       {
37          "RandomSeed",
38          {
39             description = "This method seeds the random number generator.",
40             usage = "This method needs to be called before any call to GetRandom(), otherwise GetRandom will not retrieve a random number. The seed can be any unsigned integer, however any constant value will produce predictable results each time. For closer to true results, try using GetTime() as the seed.",
41             example = "      int Rand;\n"
42                "      RandomSeed((uint)(GetTime() * 1000));\n"
43                "      Rand = GetRandom(1, 10);\n"
44                "      printf(\"%d\\n\", Rand);     ",
45             also = "GetRandom(), GetTime()"
46          }
47       }
48    ]
49 }