subroutine

Using subroutines written in Fortran 90 with Abaqus Standard

Deadly 提交于 2019-12-12 09:04:21
问题 I am using Abaqus with user-defined subroutines. To the best of my knowledge, Abaqus Standard or Explicit can be used with subroutines written specifically in Fortran 77 language, not the improved Fortran 90/95 language! Is there a way how to use Fortran 90 and later with Abaqus? 回答1: By default, Abaqus expects user subroutines to be written in the older fixed-format style. However, you can use just about any modern language feature supported by your compiler. 1 This includes using modules,

3146 ODBC Call Failed - Access 2010

試著忘記壹切 提交于 2019-12-12 06:45:05
问题 Please reference code below... Private Sub Save_Click() On Error GoTo err_I9_menu Dim dba As Database Dim dba2 As Database Dim rst As Recordset Dim rst1 As Recordset Dim rst2 As Recordset Dim rst3 As Recordset Dim SQL As String Dim dateandtime As String Dim FileSuffix As String Dim folder As String Dim strpathname As String Dim X As Integer X = InStrRev(Me!ListContents, "\") Call myprocess(True) folder = DLookup("[Folder]", "Locaton", "[LOC_ID] = '" & Forms!frmUtility![Site].Value & "'")

Find longest repeating string based on input in perl (using subroutines)

ぃ、小莉子 提交于 2019-12-12 05:49:25
问题 So I'm trying to find the longest repeat for a specific pattern thats given. My code so far looks like this, and is fairly close, however it does not fully give the wanted result: use warnings; use strict; my $DNA; $DNA = "ATATCCCACTGTAGATAGATAGAATATATATATATCCCAGCT" ; print "$DNA\n" ; print "The longest AT repeat is " . longestRepeat($DNA, "AT") . "\n" ; print "The longest TAGA repeat is " . longestRepeat($DNA, "TAGA") . "\n" ; print "The longest C repeat is " . longestRepeat($DNA, "C") . "\n

control flow validation in perl

左心房为你撑大大i 提交于 2019-12-12 02:12:34
问题 This is my code which has switch statement works fine but if user enters greater than 3 or blank text then it should stay in first sub routine how can i do this in perl use strict; use warnings; use Switch; my $input = "Enter the number:"; sub input(){ print "Choose You Input Method"."\n"; print "1.UPC"."\n"; print "2.URL"."\n"; print "3.Elastic Search"."\n"; print $input; $input = <>; chomp($input); switch($input){ case 1 {print "UPC"."\n"} case 2 {print "URL"."\n"} case 3 {print "Elastic

perl loops within subroutines to display the longest repeating string thats selected for a particular subsection of the string [duplicate]

微笑、不失礼 提交于 2019-12-11 23:29:22
问题 This question already has answers here : Find longest repeating string based on input in perl (using subroutines) (2 answers) Closed 6 years ago . I was wondering if anyone knows how to simplify, or generalize this code. It gives the correct answer, however it is only applicable to the current situation. My code is as follows: sub longestRepeat{ # list of argument @_ is: (sequence, nucleotide) my $someSequence = shift(@_); # shift off the first argument from the list my $whatBP = shift(@_); #

Count the number of variable combinations in a logfile using perl

一世执手 提交于 2019-12-11 20:01:48
问题 I have this logfile New connection: 141.8.83.213:64400 (172.17.0.6:2222) [session: e696835c] 2016-04-29 21:13:59+0000 [SSHService ssh-userauth on HoneyPotTransport,3,141.8.83.213] login attempt [user1/test123] failed 2016-04-29 21:14:10+0000 [SSHService ssh-userauth on HoneyPotTransport,3,141.8.83.213] login attempt [user1/test1234] failed 2016-04-29 21:14:13+0000 [SSHService ssh-userauth on HoneyPotTransport,3,141.8.83.213] login attempt [user1/test123] failed I want to output to file a

How to pass subroutine names as arguments in Fortran classes

☆樱花仙子☆ 提交于 2019-12-11 11:53:46
问题 In How to pass subroutine names as arguments in Fortran? we learned how to pass subroutine names as arguments in Fortran. How can we do this inside a class structure? The ensuing code produces the following compilation error using GNU Fortran (GCC) 5.1.0: gfortran -Wall -Wextra -Wconversion -Og -pedantic -fcheck=bounds -fmax-errors=5 class_pass.f08 myClass.f08:44:30: class ( test ), target :: me 1 Error: Derived type ‘test’ at (1) is being used before it is defined myClass.f08:9:21: procedure

Getting error "local variable referenced before assignment - how to fix?

你。 提交于 2019-12-11 10:39:36
问题 I'm making a gambling program (i know this shouldn't be incredibly hard), and want to have multiple games which will be in subroutines. However, python seems to think my variables are being assigned in strange places. I am semi-new to subroutines, and still have some issues here and there. Here is what I am working with: # variables and subroutines money = 500 losses = 0 wins = 0 wlr = (wins,':',losses) egg = True def fiftyfifty(bet): chance = random.randint(0,100) if chance > 50: losses += 1

Compilation failed while trying to run Chart Clicker

若如初见. 提交于 2019-12-11 10:27:12
问题 I am trying to make Chart Clicker works in Perl. I have downloaded the example pie.pl . And I have configured everything by installing all the modules properly. But whenever I try to run the pie.pl example . I get the below exception. Can anyone suggest me why is it happening and how can I overcome this? C:\Perl64\site>perl pie.pl Subroutine share_axes_with redefined at lib/Chart/Clicker/Context.pm line 120. The 'add_attribute' method cannot be called on an immutable instance at C:/Perl64

Perl calling subroutine with leading '&' [duplicate]

好久不见. 提交于 2019-12-11 08:53:20
问题 This question already has answers here : When should I use the & to call a Perl subroutine? (4 answers) Closed 5 years ago . Every now and then I see Perl scripts where subroutines are called with a leading '&'. Is this legacy, or does it give any benefit? As calling the subroutine without the ampersand sign works as well. sub mysub { print "mysub\n"; } mysub; &mysub; Thx/Hermann 回答1: Calling with & is generally a code smell that somebody doesn't know what they're doing and are in a Perl4