- This wiki is out of date, use the continuation of this wiki instead
Ftime
From FenixWiki
(Difference between revisions)
Revision as of 00:36, 30 April 2007 (edit) Sandman (Talk | contribs) ← Previous diff |
Revision as of 00:38, 30 April 2007 (edit) (undo) Sandman (Talk | contribs) m (Category) Next diff → |
||
Line 1: | Line 1: | ||
[[Category:functions]] | [[Category:functions]] | ||
- | [[Category: | + | [[Category:time]] |
==Definition== | ==Definition== |
Revision as of 00:38, 30 April 2007
Contents |
Definition
STRING ftime ( <STRING format> , <INT time> )
Puts a certain time in a certain format.
It returns the specified string, with certain keywords replaced with their corresponding values, according to the specified time. The current time is fetched by use of the function time().
Parameters
STRING format | - The format wanted. |
INT time | - The time to be put in the formatted string. |
Returns
STRING : The formatted string.
Example
Program currenttime; Private String timestring; // The string holding the formatted time Begin write_string(0,0,0,0,×tring); // Display the timestring timer = 100; // Make it so it updates the timestring immediately Repeat if(timer>100) // Update the timestring every 1 second timer = 0; timestring = ftime("%d-%m-%Y %H:%M:%S",time()); end frame; Until(key(_esc)) End
Used in example: write_string(), time(), key(), timer