7 Replies - 1057 Views - Last Post: 28 May 2011 - 06:06 PM Rate Topic: -----

#1 FLStudent  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-May 11

proper terminology

Posted 28 May 2011 - 03:16 PM

what is the difference between legal and valid input? i am taking a beginning programming class. thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: proper terminology

#2 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2834
  • View blog
  • Posts: 9,740
  • Joined: 08-August 08

Re: proper terminology

Posted 28 May 2011 - 03:26 PM

I would guess that legal input is allowable by type. You can enter any floating point temperature value you like as long as it is numeric. Valid input is not only legal but is within parameter limits. A value of -275 Kelvin is legal but not a valid temperature.
Was This Post Helpful? 0
  • +
  • -

#3 FLStudent  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-May 11

Re: proper terminology

Posted 28 May 2011 - 03:43 PM

View PostCTphpnwb, on 28 May 2011 - 03:26 PM, said:

I would guess that legal input is allowable by type. You can enter any floating point temperature value you like as long as it is numeric. Valid input is not only legal but is within parameter limits. A value of -275 Kelvin is legal but not a valid temperature.


so as that relates to the currency "peso", entry would be legal if it was a real number but invalid if the number had a decimal point?
Was This Post Helpful? 0
  • +
  • -

#4 ishkabible  Icon User is offline

  • spelling expret
  • member icon





Reputation: 1618
  • View blog
  • Posts: 5,707
  • Joined: 03-August 09

Re: proper terminology

Posted 28 May 2011 - 03:48 PM

it depends on they data type but yes, if your function wanted an integer amount of pesos and you input a floating point value that would be legal but invalid.
Was This Post Helpful? 1
  • +
  • -

#5 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: -4
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: proper terminology

Posted 28 May 2011 - 05:16 PM

View PostFLStudent, on 28 May 2011 - 11:16 PM, said:

what is the difference between legal and valid input? i am taking a beginning programming class. thanks!

These terms are interchangeable in that input which is appropriate for the expected data type for your variable is valid/legal. A second case is actually defined by your program logic in that if the input falls inside a certain range and is of a type suitable to the variable, then it can also be considered legal/valid input.
Was This Post Helpful? 0
  • +
  • -

#6 FLStudent  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-May 11

Re: proper terminology

Posted 28 May 2011 - 05:57 PM

View PostButchDean, on 28 May 2011 - 05:16 PM, said:

View PostFLStudent, on 28 May 2011 - 11:16 PM, said:

what is the difference between legal and valid input? i am taking a beginning programming class. thanks!

These terms are interchangeable in that input which is appropriate for the expected data type for your variable is valid/legal. A second case is actually defined by your program logic in that if the input falls inside a certain range and is of a type suitable to the variable, then it can also be considered legal/valid input.


I have to finish a flowchart that was partially completed by the instructor. He has a decision symbol for "Legal Input?" and another below it for "Valid Input?". So he is expecting a distinction.
Was This Post Helpful? 0
  • +
  • -

#7 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: -4
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: proper terminology

Posted 28 May 2011 - 06:04 PM

View PostFLStudent, on 29 May 2011 - 01:57 AM, said:

View PostButchDean, on 28 May 2011 - 05:16 PM, said:

View PostFLStudent, on 28 May 2011 - 11:16 PM, said:

what is the difference between legal and valid input? i am taking a beginning programming class. thanks!

These terms are interchangeable in that input which is appropriate for the expected data type for your variable is valid/legal. A second case is actually defined by your program logic in that if the input falls inside a certain range and is of a type suitable to the variable, then it can also be considered legal/valid input.


I have to finish a flowchart that was partially completed by the instructor. He has a decision symbol for "Legal Input?" and another below it for "Valid Input?". So he is expecting a distinction.

Then you need to ask your instructor what they believe the distinction to be. :)
Was This Post Helpful? 0
  • +
  • -

#8 ishkabible  Icon User is offline

  • spelling expret
  • member icon





Reputation: 1618
  • View blog
  • Posts: 5,707
  • Joined: 03-August 09

Re: proper terminology

Posted 28 May 2011 - 06:06 PM

like the first posts above said, if there is a distinction to be mad then "valid" most likely means logically valid

3/0
is legal code but not valid code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1