assignment

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...

As3 - Assign class to object on stage

Hello, I think the title should make it pretty clear. I was wondering how you can assign a class to an object on stage. As you would do with actionscript: var objectname:ClassName = new ClassName(); This would make a new object, but the current object already exists, it just needs to be notified that it's of the type "ClassName" so it...

Assigning an address to a struct pointer array member in C.

Having considerable trouble with some pointer arithmatic. I think I get the concepts (pointer variables point to a memory address, normal variables point to data) but I believe my problem is with the syntax (*, &, (*), *(), etc.) What I want to do is build dynamic arrays of a custom struct (i.e. arrays of pointers to heap structs), and ...

Assigning an IronPython method to a C# delegate

I have a C# class that looks a little like: public class MyClass { private Func<IDataCource, object> processMethod = (ds) => { //default method for the class ...

Variable ora (time) with blank

The following assignment: set ora=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2% returns the value " 9194234" when the time is 9.19.42,34. How can be squeezed the value or better to have the value "09194234"? ...

what's meaning that sign of assignment.

hi, i don't understand assignment in the following line. i think, setBit is a function but it's assigned a value. bool setBit(const unsigned int which) = 0; ...

Stuck in a while loop, can you please help?

I am currently writing a program that reads records from a txt file and prints the data on the screen as such: GRADE REPORT NAME COURSE GRADE ----------------------------------------------------------- JOE FRITZ AMERICAN GOVERNMENT B ...

Which costs more while looping; assignment or an if-statement?

Consider the following 2 scenarios: boolean b = false; int i = 0; while(i++ < 5) { b = true; } OR boolean b = false; int i = 0; while(i++ < 5) { if(!b) { b = true; } } Which is more "costly" to do? If the answer depends on used language/compiler, please provide. My main programming language is Java. Please do n...

Assigning a value to an element of a slice in Python

This is a simple question about how Python handles data and variables. I've done a lot of experimenting and have Python mostly figured out, except this keeps tripping me up: [edit: I separated and rearranged the examples for clarity] Example 1: >>> a = [[1], 2] >>> a[0:1] [[1]] >>> a[0:1] = [[5]] >>> a [[5], 2] # The assignment worked...

C assignment of int

Hi, When you see code like this in C, what's the order of assignment? int i = 0, var1, var2; I don't understand the syntax... ...