Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!gsg0384 From: gsg0384@uxa.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: How much illegal are these? Message-ID: <116400001@uxa.cso.uiuc.edu> Date: 17 Aug 89 06:24:00 GMT Lines: 27 Nf-ID: #N:uxa.cso.uiuc.edu:116400001:000:596 Nf-From: uxa.cso.uiuc.edu!gsg0384 Aug 17 01:24:00 1989 Hi, How much illegal are the following two statements? program main real b, c, a(10,10) data a/100*1./ ! or assign them by two do loops b = 0*a(0,2) c = 0*a(1,0) print*, b,c stop end 1. Is the first line equivalent to b = 0*a(10,1) on every machine? If it is, can't we say it's legal? Anyway, is the outcome machine-dependent? 2. Does the second line always give c = 0. on every machine? This kind of cases always occur when one wants to vectorize do loops. Hugh song@ardent1.ceg.uiuc.edu or gsg0384@uxa.cso.uiuc.edu