Hi I am trying to write a script that converts centigrade to fahrenheit and vice versa I need to use a sub-function to perform the calculations. Can anyone help me get started on this I am kinda lost and will like help learning this thank you
cyberman111
0
Newbie Poster
Recommended Answers
Jump to PostHey There,
To convert Celsius to Fahrenheit, multiply by 1.8 and add 32 degrees.
Hope that helps you get where you're going.
Jump to PostHey There,
If you're using bash, you can just do this (pseudocode to follow)
function MYFUNCTION { code in here return $answer }
and then call it from the script with
MYFUNCTION arg1 arg2, etc
Inside the function, the arg's that you pass …
All 5 Replies
cyberman111
0
Newbie Poster
eggi
92
Posting Whiz
cyberman111
0
Newbie Poster
eggi
92
Posting Whiz
Impact4ever
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.