π
<-

examples for creating dialog boxes

Programmation et implémentation d'algorithmes.

examples for creating dialog boxes

Unread postby compsystems » 09 Mar 2017, 16:00

A series of examples for creating dialog boxes, (For now with comments in Spanish, soon also in English)
/!\ require copytoh89 ASM prg http://www.ticalc.org/archives/files/fi ... 16366.html for return the output on home history

The source codes were created using the TI-EDIT (TI-68K editor) You can copy and paste them in unicode format,
http://pengels.bplaced.net/index.php/tiedit (TI-EDIT 2017)

The REQUEST CMD (TI-68K CALCS) is practically the same that the REQUEST of the TI-NSPIRE-CX-CAS

example#0
Code: Select all
reqDemo()
Prgm
  ClrIO
  Local statsvar,alphalck
  0→alphalck
  Request "Radious",r,alphalck
  expr(r)→r
  ok→statsvar
  If ok=1 Then
    Disp "Area = π*"&string(r)&"² = "&string(π*r^2.)&" u²"
  EndIf
  Pause:DispHome
EndPrgm


Now if you want to return to the HOME history, use the copytoh89.v2z/89z ASM PRG (renamed to return_h.v2z/89z)

Code: Select all
reqDemo1()
Prgm
  ClrIO
  Local statsvar,radious,area,r
  "radious"→radious
  Request radious,r
  expr(r)→r
  π*r^2.→area
  ok→statsvar
  If statsvar=1 Then
    return_h("radious","area")
  EndIf
EndPrgm



example #1
Code: Select all
reqstv01()
Prgm
  ClrIO
  Local statsvar,radious,area,r
  "radious"→radious
  Request radious,r
  expr(r)→r
  π*r^2.→area
  ok→statsvar
  If statsvar=1 Then
    return_h("radious","area")
  EndIf
EndPrgm



example #2
Code: Select all
reqstv1a()
Prgm
  ClrHome
  string(x)→x © valor inicial global (pero como cadena) de la variable de almacenamiento. Siempre que se llame a la orden de usuario reqstv1a() el valor será el ultimo almacenado en memoria

  Local label © etiqueta de la variable de almacenamiento
  "x"→label

  Local alphalck © activar o no teclado alfabético, [0=NO, 1/vacio= SI] (solo ti89) en el campo de entrada
  0→alphalck

  Request label,x,alphalck
  expr(x)→x
  return_h("label","x")
EndPrgm



example #3
Code: Select all
reqstv1c()
Prgm
  © Agregando TÍTULO PERSONALIZADO
  ClrHome
  string(x)→x © valor inicial global (pero como cadena) de la variable de almacenamiento. Siempre que se llame a la orden de usuario reqstv1c() el valor será el ultimo almacenado en memoria

  Local label © etiqueta de la variable de almacenamiento
  "x"→label

  Local alphalck © activar o no teclado alfabético, [0=NO, 1/vacio= SI] (solo ti89) en el campo de entrada
  0→alphalck

  Dialog
    Title "Titulo: INPUT"
    Request label,x,alphalck
  EndDlog
  expr(x)→x
  return_h("label","x")

EndPrgm



example #4
Code: Select all
reqsskey()
Prgm
  © Detectando teclas pulsadas [ESC] [OK]
  ClrHome
  string(x)→x © valor inicial global (pero como cadena) de la variable de almacenamiento. Siempre que se llame a la orden de usuario reqsskey() el valor será el ultimo almacenado en memoria

  Local label © etiqueta de la variable de almacenamiento
  "x"→label

  Local alphalck © activar o no teclado alfabético, [0=NO, 1/vacio= SI] (solo ti89) en el campo de entrada
  0→alphalck

  Local retdone
  done→retdone

  Local none
  "Esc"→none

  Dialog
    Title "Titulo: INPUT"
    Request label,x,alphalck
  EndDlog
  expr(x)→x

  ok→ok_levl1
  If ok_levl1=1 Then
    return_h("label","x")
  Else
    return_h("none","retdone")
  EndIf
EndPrgm



Code: Select all
reqstv1d()
Prgm
  © Agregando una ayuda
  ClrHome: © delvar x
  string(x)→x

  © Maximo x caracteres
  Local help
  "Ayuda: Ingrese valor para x          :"→help

  Local retdone
  done→retdone
  Local none
  "Esc"→none

  Dialog
    Title "Titulo: INPUT"
    Text help
    Request "x",x,0
  EndDlog
  expr(x)→x

  ok→ok_levl1
  If ok_levl1=1 Then
    return_h("label_in","x")
  Else
    return_h("none","retdone")
  EndIf
EndPrgm

Writing ..
User avatar
compsystems
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 41.8%
 
Posts: 258
Joined: 30 May 2011, 13:44
Gender: Male
Calculator(s):
MyCalcs profile

Return to Programmation

Who is online

Users browsing this forum: ClaudeBot [spider] and 3 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1765 utilisateurs:
>1747 invités
>12 membres
>6 robots
Record simultané (sur 6 mois):
29271 utilisateurs (le 11/07/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)