+ 3
Is it possible to have 2 values to have the same variable?
I am a Chromebook Tech at a school district. We have thousands of Chromebooks to maintain. each Chromebook has two identifiers on them (the district asset tag and the Chromebook serial number). How do I set one variable to have 2 different values. I want the users to be able to type one of the two values and get the variable. Is this possible?
8 Respostas
+ 4
Answer:
You can store one value into one variable at same time. If you want to store another value into that variable it will be replaced.
Suggestion:
It is better to use dynamic array, it will help you to store values as many as you want at the run time.
+ 2
no it is not possible to have two values of a same variable
+ 2
I suggest that you should use array function such that !! you can have one variable declared but you can give as many value you want ,just Declare variable name with[] number of time you want it to occur in program ..
+ 1
I've not much experience in programming but according to my knowledge there can be only one of a variable 'at a time'.
+ 1
Then you have to use an array
+ 1
Try finding similarities between serial numbers or district asset tags. Like fixed length or some number that pops up when summed all the numbers.
So you can write an algorith that says, "Hmm, its a serial number length thing, so it should be a serial number!".
If its not a serial number than its a district asset tag probably. You can use it as a shortcut (Bkz: benefits of else).
Hope helps : )
+ 1
no you can't... because it will replace the previous value stored in it.