This wiki is out of date, use the continuation of this wiki instead

Cd

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:19, 19 April 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Revision as of 23:43, 21 January 2008 (edit) (undo)
Sandman (Talk | contribs)
(merged CD1 in)
Next diff →
Line 1: Line 1:
[[Category:functions]] [[Category:functions]]
[[Category:files]] [[Category:files]]
- 
-See also [[cd1|'''VOID''' CD( <'''STRING''' folder> )]] 
==Definition== ==Definition==
-'''STRING''' CD ( )+'''STRING''' cd ( [<'''STRING''' folder>] )
-Returns the current path of execution.+Sets the current path of execution if ''folder'' was specified and returns it.
 + 
 +Note that it is '''highly recommended''' to use [[chdir]]() for changing the current path of execution, as cd() will make [[Fenix]] crash when a folder is specified and the returned path of execution is used in the Fenix program. Just using cd() without a folder is not a problem.
 + 
 +== Parameters ==
 +{|
 +| '''STRING''' folder || - The folder to be entered from the current path of execution or a new path of execution.
 +|}
== Returns == == Returns ==
Line 17: Line 22:
Begin Begin
- say(CD());+ say(cd());
- ChDir("..");+ say(chdir(".."));
- say(CD());+ say(cd());
- Loop+ Repeat
frame; frame;
- End+ Until(key(_ESC))
End End
</pre> </pre>
-Used in example: [[chdir]](), [[say]]()+Used in example: [[chdir]](), [[say]](), [[key]]()
 + 
 +{{Funcbox
 + | category=Files
 +}}

Revision as of 23:43, 21 January 2008


Contents

Definition

STRING cd ( [<STRING folder>] )

Sets the current path of execution if folder was specified and returns it.

Note that it is highly recommended to use chdir() for changing the current path of execution, as cd() will make Fenix crash when a folder is specified and the returned path of execution is used in the Fenix program. Just using cd() without a folder is not a problem.

Parameters

STRING folder - The folder to be entered from the current path of execution or a new path of execution.

Returns

STRING : The current path of execution.

Example

Program example;
Begin

    say(cd());
    say(chdir(".."));
    say(cd());

    Repeat
        frame;
    Until(key(_ESC))

End

Used in example: chdir(), say(), key()


Files Functions
Cd() • Chdir() • Fclose() • Feof() • Fgets() • File() • File_exists() • Flength() • Fopen() • Fputs() • Fread() • Fseek() • Ftell() • Fwrite() • Glob() • Load() • Mkdir() • Rmdir() • Save() •
Personal tools