MedVision ad

Help pls (1 Viewer)

FudiddidoAdrian

Active Member
Joined
Feb 7, 2024
Messages
157
Gender
Male
HSC
2024
Guys is phone number a text or number value? I would assume its text but the answer for 2021 ipt says its numerical. Eg: 0427829201
 

MoeyNeeds90+

Well-Known Member
Joined
May 2, 2024
Messages
209
Location
Beach...flashing ma 6 pack 😏
Gender
Male
HSC
2025
Guys is phone number a text or number value? I would assume its text but the answer for 2021 ipt says its numerical. Eg: 0427829201
Text, if the exam did say it as "numerical," it could be referring to the digits of the phone number without formatting or perhaps within a certain programming context where phone numbers are treated as numbers for validation purposes. But yes, it's safer to treat phone numbers as text (string). 👍
 

Demons

Goated Member
Joined
Aug 21, 2023
Messages
238
Gender
Male
HSC
2024
Guys is phone number a text or number value? I would assume its text but the answer for 2021 ipt says its numerical. Eg: 0427829201
If it has a space in between the digits like 0427 829 201 then it is text because spaces can't be stored in a numerical form, but if the number is continuous with no spaces like 0427829201, it would a number.
 

igor9

Well-Known Member
Joined
Sep 9, 2024
Messages
567
Gender
Male
HSC
2024
u can't start a number with 0, hence it has to be text
 

FudiddidoAdrian

Active Member
Joined
Feb 7, 2024
Messages
157
Gender
Male
HSC
2024
If it has a space in between the digits like 0427 829 201 then it is text because spaces can't be stored in a numerical form, but if the number is continuous with no spaces like 0427829201, it would a number.
yes that makes sense. idk why the 0 doesnt get disregarded tho
 

Demons

Goated Member
Joined
Aug 21, 2023
Messages
238
Gender
Male
HSC
2024
yes that makes sense. idk why the 0 doesnt get disregarded tho
In a computer everything is stored, it doesn't disregard anything because if the data were to be extracted and used somewhere else without the 0 and the different system needed the 0 it would lead to a error that's why the computer still stores the 0 to be safe.
 

dav53521

Well-Known Member
Joined
Mar 23, 2022
Messages
317
Gender
Male
HSC
2022
In a computer everything is stored, it doesn't disregard anything because if the data were to be extracted and used somewhere else without the 0 and the different system needed the 0 it would lead to a error that's why the computer still stores the 0 to be safe.
This is not true because for integers/number data types the leading 0s are typically dropped. Plus it doesn't really make much sense to store the initial 0 because typically integers are used for numerical processing/calculations which keeping/dropping the leading 0s will have no impact on.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top