Skip to content
EMPS intranet

Back to top
Hi!   Hi!           Start main()

Try stepping through the code


  Value and type of last evaluated expression: Address of array element: Address of array elementx:  (none)

Your browser does not support the canvas element which will make some the features unavailable.

If you are using Internet Explorer within the University of Exeter try going to the Settings menu (probably the gear shape at the top right of this page), selecting "Compatibility View settings", unchecking "Display intranet sites in Compatibility View" and reloading this page.

Code

 Header...
float myfun(int dim,float ydim[][dim]){
  ...
» float x, y, zdim[2][2]={{0}}; » y=zdim[1]1; » x=ydim[1]1; » return 1;
} // Stress test: swap variable names float myfun2 (int ydim,float dim[][ydim]); float myfun (int ydim,float dim[][ydim]); float myfun2(int dim,float ydim[][dim]){
  ...
» float x, y, zdim2[2][2]={{0}}; » float *xp=&x; » y=zdim2[1]1; » x=ydim[1]1; » return 1;
} int main(){
  ...
» float y[3][3]; » y[1]1=1.414; » myfun(3, y); » myfun2(3, y); » return 0;
}
Memory

myfun2()

132
133
134
135
ydim = 256
144
145
146
147
148
149
150
151
?
?
?
?
x = -2.05915421e-05
152
153
154
155
156
157
158
159
y = 1.40129846e-45
xp = 148
160
161
162
163
164
165
166
167
?
?
?
?
zdim2[0][0] = 0
168
169
170
171
172
173
174
175
zdim2[0][1] = 0
zdim2[1][0] = 0
176
177
178
179
180
181
182
183
zdim2[1][1] = 0
?
?
?
?
216
217
218
219
dim = 3

myfun()

148
149
150
151
ydim = 256
152
153
154
155
156
157
158
159
x = 1.40129846e-45
y = 1.53246921e-33
160
161
162
163
164
165
166
167
?
?
?
?
zdim[0][0] = 0
168
169
170
171
172
173
174
175
zdim[0][1] = 0
zdim[1][0] = 0
176
177
178
179
180
181
182
183
zdim[1][1] = 0
?
?
?
?
216
217
218
219
dim = 3

main()

256
257
258
259
260
261
262
263
y[0][0] = 1.4013e-45
y[0][1] = 2.8026e-43
264
265
266
267
268
269
270
271
y[0][2] = -4.62845e+33
y[1][0] = -5.05919e+33
272
273
274
275
276
277
278
279
y[1][1] = 1.4013e-45
y[1][2] = -4.62852e+33
280
281
282
283
284
285
286
287
y[2][0] = 3.99905e-34
y[2][1] = 3.99896e-34
288
289
290
291
y[2][2] = 1.4013e-45

NB: the actual memory address of each variable is the
address shown plus 4290795784 (0xFFC05908).

Show Advanced options

.
                                                                                                                                                                                                                                                                       

Validate   Link-check © Copyright & disclaimer Share
Back to top