swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating Objects from the .scm file


From: Fernando Diaz
Subject: Creating Objects from the .scm file
Date: Tue, 16 Nov 1999 10:48:22 -0500 (EST)

This is perhaps a related question since it seems you want to use Scheme
files to define an instance variable beyond the base types (int, float,
etc). Is it possible to define a variable as the result of a function
call?  eg,

 (list
  (cons 'george
        (make-instance 'FlyingMonkey
                      #:wingspan  dGetNormal(25.5,5.0)
                      ...

Or some grammatically correct variation...

My guess is no since it seems the point of Scheme is to archive.

F

On Mon, 15 Nov 1999, Pau Fernandez Duran wrote:

> 
> Hi all, 
> 
> I just would like to know if there is any way in which I could create an
> object using a class object specified in a .scm file. As an example, we
> could have:
> 
> 
> This is useful if you want to switch between diferent classes of ants in
> the same colony without having to compile each time. I was thinking of
> using the string "ArmyAnt" and calling a function (which I don't know if
> really exists) _get_class_from_String() or similar, but I haven't found
> such a function (yet).
> 
> Any hints??
> 
> Many thankx in advance,  
> 
> ------------------------------------------------------
> OOO Pau Fernandez Duran
> OOO Complex Systems Research Group
> OOO Departament de F?sica y Enginyeria Nuclear (FEN)
> UPC
> 
> M?dul B4,   Campus Nord UPC  Tel.   +34-93-4017056
> c/ Sor Eulalia d'Anzizu s/n  email: address@hidden
> 08034 Barcelona 
> SPAIN
> ------------------------------------------------------
> 
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
> 
> 


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]