subroutine

Deactivate msgbox in a sub VBA

爷,独闯天下 提交于 2021-02-19 07:47:27
问题 Sub prelim() MsgboX "Hello World" End Sub Sub Main() Call prelim End Sub In the above code Sub prelim can't be edited.I want msgbox when I run Sub prelim but when I run Sub Main I don't want the message box to get popped out. How to do it? 回答1: This is not possible without changing Sub prelim Sub prelim(Optional silent As Boolean = True) If Not silent Then MsgBox "Hello World" End Sub Sub Main() prelim True 'no msgbox prelim False 'with msgbox prelim 'no msgbx End Sub 来源: https:/

Abaqus DFLUX subroutine in Fortran

六月ゝ 毕业季﹏ 提交于 2021-01-28 08:40:49
问题 this is my first post here and I hope I will be clear describing the issues I'm having with Abaqus subroutine . I'm quite a newbie using Fortran . Basically, my goal is to define a non-uniform surface heat flux over an open cross-section tube and I'm using the DFLUX subroutine . Being open cross-section, the flux is influenced by the self-shadowing of the structure and has to be defined accordingly. Apparently the subroutine is called at each integration point, so that the coordinates of

Is there anything wrong with passing an unallocated array to a routine without an explicit interface?

牧云@^-^@ 提交于 2021-01-27 06:12:48
问题 Consider: program main real, allocatable, dimension(:) :: foo integer n n=10 call dofoo(foo,n,1) allocate(foo(n)) call dofoo(foo,n,0) end program main subroutine dofoo(foo,n,mode) real foo(n) integer i,n,mode if(mode.eq.1)then n=6 return endif do i=1,n foo(i)=i enddo return end subroutine dofoo Is there anything wrong with the above code? (It works with gfortran) I pass in an un-allocated array the first time, but I don't touch it -- Is there anything in the standard that could cause this to

using a trap to output characters in assembly using SPARC instruction set

 ̄綄美尐妖づ 提交于 2020-08-26 08:27:15
问题 My assignment is as follows: Given the assembly code below, write a successfully executing trap that prints out the message “It’s a Trap” and returns to your main code. I believe most of the work has already been done and this is likely an easy question but I'm working without any knowledge of assembly so I'm still very much in need of some help. I understand the concept of traps but not the syntax so what I'm really wondering is what kind of answer the question is looking for. The part