fortran coding

luvbite38

Active Member
Joined
Jun 25, 2008
Messages
368
what does NCCH mean and what does it do?

I have a following code and I am trying to understand what NCCH is doing in this code?

if FLA gt 2 goto 240
.
.
.
.
240 NCCH = "2 "

thanks in advance
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Thanks VoG

In the following code what part NCCH is playing?
if (FLA GT 2 *(FLB+NDIA) GO TO 25000
E1 = FLA+FLB
Theta = COS (E1)
ANGLE = 2*THETA
FLC = FLB+NDIA
FLCUT = FLA+NDIA/2*ANGLE
Return
25000 NCCH = "2 "
Return

what I am trying to understand what would happen if FLA is not greater than 2 *(FLB+NDIA)??

please help

Thanks
 
Upvote 0
In that case, the following runs

E1 = FLA+FLB
Theta = COS (E1)
ANGLE = 2*THETA
FLC = FLB+NDIA
FLCUT = FLA+NDIA/2*ANGLE

then the code returns to the calling routine without assigning a value to NCCH,
 
Upvote 0
thanks alot, pls accept my apology in advance as I am totally new to fortran.

if FLA is not GT than xx
it will run the above stated but if the FLA is GT than xx what will happen than?
 
Upvote 0
In that case the code that I posted does NOT run but this runs instead

25000 NCCH = "2 "
 
Upvote 0
thanks once again :)

Basically, program is utilsing above code to calculate the FLCUT

and I am trying to understand what would NCCH = 2 will do in above case??

Am I right to say my answer will be FLCUT = 2? (i doubt it tho)
 
Upvote 0
We would need to see all of the code to tell you that.

What is strange is that NCCH = "2" is setting NCCH to be the character 2 (text value), not a number.
 
Upvote 0
It can't be the entire code. In any case if that is the bulk of the code then if the GT comparison is true then no value is assigned to FLCUT.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,718
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top