Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do i understand the difference between variable and fixed?
#1
Variable- nothing is the same when variable is used

Fixed- same thing each time its used

#2
Depends what you're referring to.

#3
(06-08-2018, 08:15 AM)GuiltySpark Wrote:  Depends what you're referring to.

if referring to the example code below, the variables A,B and C can change and the value of PI is fixed


int A,B  (declares two variables as integer whole numbers)
float C  (declares C as a variable which can be a decimal number)
import math (contains a whole library of maths functions including the fixed value of PI)
A=1
B=2
C=3       (initialises the 3 variables)

B=B+3
A=2*B
C=3*PI

Print A, B, C


10, 5, 9.4247

#4
(06-08-2018, 08:15 AM)GuiltySpark Wrote:  Depends what you're referring to.

Oh sorry i was referring to the proccessor quantum

#5
I would say pretty much, it would make sense in fact the maths program in the post above would also make sense as you're talking about processing. But yea, fixed and variable is about right.

#6
(06-11-2018, 08:11 AM)GuiltySpark Wrote:  I would say pretty much, it would make sense in fact the maths program in the post above would also make sense as you're talking about processing. But yea, fixed and variable is about right.

Alright thank you guys we can close the thread



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.