Browse files

Added some documentation about the macro `from`.

  • Loading branch information...
1 parent 50a3d8c commit 707c584d4b8909bdc36e1a025752eb0868e0a6cf @dahlia committed Mar 14, 2010
Showing with 16 additions and 2 deletions.
  1. +16 −2 README.markdown
@@ -94,8 +94,8 @@ the full environment. Following code touches file a.txt and writes some text.
(flose fp)}
-Macro `use`
+Macro `use` and `from`
The full environment of Lisphp provides `use` macro. It can import native
PHP functions and classes.
@@ -122,6 +122,20 @@ Static methods in imported classes are also imported.
(<PDO> "mysql:dbname=testdb;host=" "dbuser" "dbpass")
(Lisphp/<Program>/load "program.lisphp")
+There are the macro `from` also. It makes importing objects with resolved names
+ (from Lisphp [<Program> <Scope>])
+It has the same behavior as following code that contains `use`.
+ (use Lisphp/<Program> Lisphp/<Scope>)
+ (define <Program> Lisphp/<Program>)
+ (define <Scope> Lisphp/<Scope>)
+ (define Lisphp/<Program> nil)
+ (define Lisphp/<Scope> nil)

0 comments on commit 707c584

Please sign in to comment.