|
|
array assignment #2
Hi
ususally one would write
a = (/1, 2, 3/)
Which standard introduced the following form as an alternative?
a = [1, 2, 3]
Thanks
Daniel
|
|
0
|
|
|
|
Reply
|
no.spam.address (65)
|
8/5/2011 2:53:36 PM |
|
Daniel H <no.spam.address@gmx.de> wrote:
> ususally one would write
> a = (/1, 2, 3/)
>
> Which standard introduced the following form as an alternative?
>
> a = [1, 2, 3]
F2003. I might note that the subject line is slightly misleading in that
this isn't anything particular to assignment. It is an array constructor
and can be used in many contexts - not just assignment.
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
|
|
0
|
|
|
|
Reply
|
nospam47 (9742)
|
8/5/2011 2:55:31 PM
|
|
On 08/05/2011 04:55 PM, Richard Maine wrote:
> Daniel H<no.spam.address@gmx.de> wrote:
>
>> ususally one would write
>> a = (/1, 2, 3/)
>>
>> Which standard introduced the following form as an alternative?
>>
>> a = [1, 2, 3]
>
> F2003. I might note that the subject line is slightly misleading in that
> this isn't anything particular to assignment. It is an array constructor
> and can be used in many contexts - not just assignment.
>
True, thanks!
|
|
0
|
|
|
|
Reply
|
no.spam.address (65)
|
8/5/2011 3:36:20 PM
|
|
|
2 Replies
46 Views
(page loaded in 0.065 seconds)
Similiar Articles: ISO C++ forbids assignment of arrays - is there a way out ? - comp ...("expected primary-expression before '{' token" -- "ISO C++ forbids assignment of arrays") Is there a way out, or do I have to give up and use a pointer to A as member ... error: Subscripted assignment dimension mismatch. - comp.soft-sys ...Subscripted assignment dimension mismatch. Set a breakpoint in the line "n = size ... Suggest me a way of naming columns in output file. ... to create a cell array with ... Unpacking a cell array into multiple variables - comp.soft-sys ...Hi! I have an MxN cell array, C, I'd like to unpack--using assignment syntax and without explicit looping--into N variables, i.e., I'd like to do som... Problem with Matmul - comp.lang.fortranI keep getting this error when I run my file: In file lab12A.f95:56 RESULT = MATMUL(array, array2) 1 Error: Incompatible ranks 0 and 2 in assignment at (1). Sourced allocation - how is the value copied? - comp.lang.fortran ...On Jan 31, 2:38=A0pm, Rich Townsend <mylastn...@astro.wisc.edu ... intrinsic assignment does not work if one wants to resize the array. You could use a defined assignment ... Copying rows in a two dimensional array. - comp.lang.ada ...I'm working with a two dimensional array of floating point values. Lets call it A. ... I realize that the original question was about using assignment to copy slices. New features added to development gawk - comp.lang.awkThen B["someindex"] would be (in this example) a float, B["anotherindex"] would be a string, etc. Basically it's just array assignment, and another extension of the ... Structure array size 1x1 - comp.soft-sys.matlab... could create the struct and then use field-indexed assignment to assign the cell array into the (scalar) struct. Compare the four S* variables below: C = {1, 2, 3 ... Performance: struct vs. cell array - comp.soft-sys.matlab ...... and I found that in this application the cell array performed about twice as fast for assignment ... all M = 100; % number of repetitions N = 2^10; % size of cell array ... matlab code FOR RECTANGULAR ARRAY ANTENNA - comp.soft-sys.matlab ...... comp.soft-sys.matlab When i input MATLAB CODE: N=11; a= -2; b=2; h=(b-a ... ARRAY ... code must ... replace "size" with the actual size of your array ... Improper assignment ... Array Assignment « Roy MacLean's VBA BlogIn various programming languages, including VBA, arrays inhabit a twilight zone between the basic types and the classes. For example, there is usually a ... C++ Help (arrays assignment)? - Yahoo! AnswersBest Answer: What kind of arrays are required here? C arrays? C++ arrays? Or maybe valarrays? I'll assume C arrays, although that makes the syntax a bit ... 7/25/2012 11:05:45 PM
|
|
|
|
|
|
|
|
|