Re: automatically call functions based on arguments




1) create a string with the function name (upper case!)
2) create a symbol from the string (use INTERN)
3) check if the symbol names a function (use FBOUNDP)
4) use FUNCALL on the symbol to call that function

if you really have macros replace 4) with:

4) create a list with the name of the function/macro as an element
5) call EVAL with the list as an argument


That is exactly what I want to achieve. Thanks.
.



Relevant Pages

  • Re: How to use the UNIX command: tr
    ... > "Does anyone know how to convert a lower case string to upper case ... > Which ignores the OPs question, even though the poster is obviously ... I'm sorry, that is my response, taken out of context. ...
    (comp.unix.solaris)
  • Re: How to use the UNIX command: tr
    ... > I know very well they are POSIX compliant keywords. ... "Does anyone know how to convert a lower case string to upper case ... Which ignores the OPs question, even though the poster is obviously ...
    (comp.unix.solaris)
  • How to add a string to a big file in csharp !
    ... I want to add a string to the file and the file is sort by letter! ... string str = sr.ReadLine; ... long upper = fs.Length - 1; ... the FileStream is fitable in it? ...
    (microsoft.public.dotnet.languages.csharp)
  • How to add a string to a big file in csharp !
    ... want to add a string to the file and the file is sort by letter! ... Just after "cabbage" and at the front ... string str = sr.ReadLine; ... long upper = fs.Length - 1; ...
    (microsoft.public.dotnet.general)
  • Re: Determining encoding (Thai)
    ... Since there was no upper value I am assuing the data is ... >> Sample string byte decoded. ... > I mean how it is in the Unicode string after you've read it from the ... > foreach (char c in theString) ...
    (microsoft.public.dotnet.languages.csharp)