Hello, Bernard, the REQUEST command of Xcas, modifies the OK variable to 1 when [enter] is pressed, as the ti68k calcs, but when you press [CANCEL] Xcas must assign the value of zero to OK variable, for the purpose of executing selective code .
...
: Else
: Disp ok
: ...
...

Code : Tout sélectionner
:requestcmd0()
:Prgm
: ClrIO
: Local r
: Request "Radious",r
: If ok==1 Then
: Disp ok
: expr(r)→r
: Disp "r="&r
: Disp "Area = π*"&string(r)&"² = "&string(π*r^2)&"_u²"
: Else
: Disp ok
: EndIf
: // Pause
: DispHome
:EndPrgm:;