It seems that under Windows (XP), the address field which is returned is in the form ip-address:port.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(macro (curry*)
(case (length $args)
(2 (letex (F (args 0) A (args 1)) (fn(x) (F A x))))
(3 (letex (F (args 0) A (args 1) B (args 2)) (fn(x) (F A B x))))))
(set 'K (curry* + 1))
> (lambda (x) (+ 1 x))
(set 'L (curry* + 1 2))
>(lambda (x) (+ 1 2 x))
char * readStreamLine(STREAM * stream, FILE * inStream)
{
char buf[MAX_STRING];
size_t l;
openStrStream(stream, MAX_STRING, 1);
if(fgets(buf, MAX_STRING, inStream)!=NULL)
{
l=strlen(buf);
if(buf[l-1]==0x0A)
{
buf[--l]=0;
if(buf[l-1]==0x0D) buf[--l]=0;
}
writeStreamStr(stream, buf, l);
return(stream->buffer);
}
else
{
if(feof(inStream)) clearerr(inStream);
return NULL;
}
}
May be if you replace (println k) with (println "=====>" k), you can better follow the debug behaviorQuote
fexprs are functions, so I would argue: the behavior is expected. args should always work in the context of the currently executing function and nested functions/fexprs should all keep their local versions of args, this makes code more readable too.Quote
Even when implemented natively, for every functor expression symbol parsed, you would have to do the lookup, if a reader-event is defined.Quote
(module "macro.lsp")
(define-macro (DO-UNTIL test B)
(do-while (not (eval test)) (eval B)))
(macro (DO-UNTIL* T B)
(do-while (not T) B))
(println "test 1")
(define (foo k)
(DO-UNTIL (<= k 0) (begin (println k) (dec k))))
(foo 3)
(println "test 2")
(define (foo* k)
(DO-UNTIL* (<= k 0) (begin (println k) (dec k))))
(foo* 3)
(println "test 3")
(define (bar*)
(let (k 0)
(DO-UNTIL* (>= k (args 0)) (begin (println k) (inc k)))))
(bar* 3)
(println "test 4")
(define (bar)
(let (k 0)
(DO-UNTIL (>= k (args 0)) (begin (println k) (inc k)))))
(bar 3)
(set 'GA "gappw32.dll")
(struct 'Rect "int" "int" "int" "int")
(import GA "app_new_app" "void*" "int" "void*")
(import GA "app_new_window" "void*" "void*" "Rect" "char*" "long")
(import GA "app_main_loop" "void" "void*")
(import GA "app_show_window" "void" "void*")
(import GA "app_new_label" "void*" "void*" "Rect" "char*" "int")
(import GA "app_new_button" "void*" "void*" "Rect" "char*" "void*")
(set 'GH (app_new_app 0 ""))
(set 'W (app_new_window GH (pack Rect 100 100 200 50) "Thanks Lutz" 0x3F0))
(define (sayHi) (println "Hi!"))
(set 'cb (callback 'sayHi "void*" "void*"))
(app_new_button W (pack Rect 5 5 190 40) "It works awsomely" cb)
(app_show_window W)
(app_main_loop GH)
(define (html) (tag "html" (args))
.
(set 'html (curry "html"))
would have been cool here, but it doesn't work there because the rest of the arguments are the body, and curry only works on 2-arguments procedures.
(html (body
(with: "type=submit" (form "etc."))))
The F in FOOPQuote from: "Lutz"
When you do:
> (new Class 'Person)
Person
> (Person "JohnDoe")
(Person "JohnDoe")
>
The statement(Person "JohnDoe")returns the same as an object. The object isthe functional statement to create itself. The constructor functor Personis also the class id.