evaluation

Evaluation of a small math type language that supports one variable

I have written the parser that reads the string input. That works. I have also written the evaluator that spits out the result. But there is one small detail that I'm having trouble implementing. Look at the following example: +(sw+(2,2),sr) The sw construct of this tiny language is suppose to evaluate "+(2,2)" and store it somewhere...

Creation of an object inside names<-() gives an error. How to explain?

Hi everyone, This x <- list(12, 13) names(y <- x) <- c("a", "b") gives the error: Error in names(y <- x) <- c("a", "b") : object 'y' not found Can anyone explain why? According to R's rules of evaluation y <- x should be evaluated inside the parent frame of names<-. So y should be created in global environment. Thanks. [upda...

C : is there "lazy evaluation" when using && operator, as in C++ ?

Hello, i would like to know if this looks correct : while((next !=NULL) && (strcmp(next->name, some_string) < 0) { //some process } i mean, if next is NULL, then the second part of the expression won't be ever tested by the compiler ? i have heard that in C++ it's the case (but i'm not even sure of it). Can someone confirm me th...

Binding evaluation after UI is visible.

Hi All, Here is my scenario. I have usercontrol, uc1. In uc1 i have listbox on which ItemTemplateSelector is defined and it is pointing to different DataTemplates having other usercontrols eg. uc2, uc3 etc... Items in listbox are getting updated when UI is visible. I mean, I can see for eg. in a list box item first arrow comes up, th...

When to use `constantly` in clojure, how and when are its arguments evaluated?

In the accepted answer to another question, http://stackoverflow.com/questions/3997910/setting-clojure-constants-at-runtime the clojure function constantly is used. The definition of constantly looks like so: (defn constantly "Returns a function that takes any number of arguments and returns x." {:added "1.0"} [x] (fn [& args] x)...

JSF: EvaluationException and NPE when method in a @ViewScoped bean is called

Hello, fellow Java warriors! I have this managed bean to handle the Rede (Network) entity related operations called RedesBean (NetworksBean). I have three pages to insert a new network: redes/nova.xhtml (new.xhtml), which is basically a series of input fields to insert the Network properties and a commandButton which invokes a cadastraNo...

A question about copyright

Hi all, I am raising a stupid question. If I develop a software, publish it in sourceforge with source code. But is is based on a commercial package, an evaluation version. Will I have any copyright problem? Is it illegal? ...