100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
• FORTRAN GOOD PROGRAMMING TIPS $13.49   Add to cart

Exam (elaborations)

• FORTRAN GOOD PROGRAMMING TIPS

 5 views  0 purchase
  • Course
  • FORTRAN GOOD PROGRAMMING TIPS
  • Institution
  • FORTRAN GOOD PROGRAMMING TIPS

• FORTRAN GOOD PROGRAMMING TIPS...

Preview 2 out of 7  pages

  • October 31, 2024
  • 7
  • 2024/2025
  • Exam (elaborations)
  • Unknown
  • FORTRAN GOOD PROGRAMMING TIPS
  • FORTRAN GOOD PROGRAMMING TIPS
avatar-seller
luzlinkuz
• FORTRAN GOOD PROGRAMMING TIPS



What should your stop statement do? - ANSWER Terminates the
program and returns a code of 0.

Done via the stop 0 command

What is one way of checking if your program ran successfully? -
ANSWER using the echo $? on command line. See if it prints out the
value next to your stop statement

What statement must all your programs have? - ANSWER implicit none

Your variable names should - ANSWER be very descriptive

What should be included in your declaration section for more clarity with
user? - ANSWER Variable dictionary that provides the name of the
variable, and its units

What is critical when naming variables? - ANSWER Variables MUST
have a value assigned to them before they can be used in an expression

What errors occur when you fail to assign a value to a value and use it in
an expression? - ANSWER Execution-time error or run-time error

Say a program you want to write has a constant (g = 9.81 m/s^2), how
would you use this in the program? - ANSWER Make g a parameter
that cannot change value. Done via the statement

real, parameter :: G = 9.81

Make your parameters uppercase to make them visually apparent

What are binary operators? - ANSWER They require two "operands" or
two inputs to work

, + (addition), - (subtraction), * (multiplication), / (division)

Unary Operators - ANSWER require only one operand. Includes only
the + and - operators to assign signs to numbers

Arithmetic Operator Rules - ANSWER 1) No two operators may occur
sequentially

2) Negative values cannot be exponentiated to a non-integer power or a
negative power

3) Division by zero is not permissible

a*-b - ANSWER illegala

a*(-b) - ANSWER legal

a**-2 - ANSWER illegal

a**(-2) - ANSWER legal

(-1.0)**2 - ANSWER legal

(-1.0)**2.0 - ANSWER illegal

(-1.0)**2.1 - ANSWER illegal (NaN)

(3.14)**0.5 - ANSWER legal

1.0/0.0 - ANSWER Illegal

2/0 - ANSWER Illegal

Use Parenthesis to - ANSWER Control the order of operations in an
expression

2**5-2 - ANSWER 30

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller luzlinkuz. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $13.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75632 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$13.49
  • (0)
  Add to cart