Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMP - Not this old chestnut again
#17
@TDarcos
IMP has its range of action and utility, surely this range is different from AND, OR, XOR, NOT
let's think like we are comparing multiplication with elevation to power, how many times do you use the first operation towards how many times you use the second operation?
My little IMProbable IMP library has the goal to show that it is possible using IMP if you understand its way to work. Not that the use of IMP is common.

@TDarcos, @Pete @AllReaders
pay attention!

in this code made by Gemini 
Code: (Select All)

INPUT "enter your age "; age
IsAdult = age >=18

IF IsAdult IMP True then
    PRINT "You are an adult"
ELSE
    PRINT "You are a minor"
END IF

the use of IMP is fake! Let's remember the truth table of IMP
Boolean1 IMP boolean2

IMP returns False only IF boolean2 is False!
So boolean1 IMP True = True also when boolean1 is False 

run this to verify
Code: (Select All)

'Input "enter your age "; age
false = 0
true = Not false

age = 8 ' is a minor
IsAdult = age >= 18
If IsAdult Imp true Then
    Print "You are an adult"
Else
    Print "You are a minor"
End If


age = 30 ' is an adult
IsAdult = age >= 18
If IsAdult Imp true Then
    Print "You are an adult"
Else
    Print "You are a minor"
End If

in the sum it is clear because IMP is unuseful in the previous code and we get better results using only IsAdult in the IF statement.

@Dimster
yeah
True IMP True = True  --> Verification
False IMP True = True --> Falsification

maybe here Popper enter in the coding world.
Reply


Messages In This Thread
IMP - Not this old chestnut again - by Dimster - 10-16-2024, 02:57 PM
RE: IMP - Not this old chestnut again - by bplus - 10-16-2024, 04:01 PM
RE: IMP - Not this old chestnut again - by Pete - 10-16-2024, 10:25 PM
RE: IMP - Not this old chestnut again - by TempodiBasic - 10-24-2024, 01:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)