[plt-scheme] Text-contents to a function variable

From: Thomas Chust (chust at web.de)
Date: Tue Jan 12 18:37:21 EST 2010

2010/1/12 Avi <n4alpaca at gmail.com>:
> How would I turn the contents of a text-box or multiple text-boxes
> into a numerical variable or variables for a function?

Hello,

using string->number would be an obvious option.

On a side note, I think it is potentially misleading to talk about
"turning [something] into a numerical variable". A program can turn
*values* of one type into values of another type, but *variables* are
no first class values in Scheme, but rather named locations holding
values. Speaking about turning anything into a variable only really
makes sense in the context of code transformations, for example when
discussing program design or when looking at code that is part of a
compiler.

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.