Britec Tech Support Forum

Full Version: Do i understand the difference between variable and fixed?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Variable- nothing is the same when variable is used

Fixed- same thing each time its used
Depends what you're referring to.
(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
(06-08-2018, 08:15 AM)GuiltySpark Wrote: [ -> ]Depends what you're referring to.

Oh sorry i was referring to the proccessor quantum
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.
(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