j**f 发帖数: 28 | 1 Your code looks fine. Your problem maybe comes from other part of your code
, for example your MYSUB(p(i),xx,xx,xx) can do trick things.
How do you know your p(i) have been changed? Do you print out p(i) before
or after
calling MYSUB(p(i),xx,xx,xx)? If you are sure the value have been changed
after you call MYSUB(p(i),xx,xx,xx), certainly the problem is in your MYSUB(
p(i),xx,xx,xx) instead of allocatable array problem.
I assumed your j is in the range of 32bit integer. |
|
z*****n 发帖数: 83 | 2 I want to do something to all textboxes in a form by
the following code (e.g. add 1 to .text)
call mysub(myform)
Private Sub mysub(ByVal myContainer As Object)
Dim myControl As Control
For Each myControl In myContainer.Controls
If TypeOf myControl Is TextBox Then
'do something to mycontrol
ElseIf myControl.HasChildren Then
Call mysub(myControl)
End If
Next
End Sub
now the strange thing is all my numericalupdown controls
are also change |
|
d**********g 发帖数: 1146 | 3 下面这个知道答案,但是不知道为什么,请教一下,谢谢!
consider the following code fragment:
class MySuperClass {
static void message(){
System.out.println("From the super class!");
}
}
public class MySubClass extends MySuperClass {
7. void message() {
System.out.println("From the sub class!");
}
public static void main(String args[]) {
MySubClass mysub=new MySubClass();
mysub.message();
|
|
c******d 发帖数: 906 | 4 系统是win7 64bit
VS2008+IVF 11.1
定义了一个递增数组p
根据条件,先对p分配大小, allocate p(:)
然后在loop中对一个subroutine 传递p(i),所有的p值是不变的
简化程序如下
allocate (p(j))
loop1: do i=1,j
call MYSUB(p(i),xx,xx,xx)
end do loop1
用IA-32 IVF compiler,在loop到最后的p(i)时,p中有几个数值被冲掉
用IA-64 compiler就没有问题
想仔细请教一下怎么去分析解决这个问题
先谢过 |
|