January 20, 2021, 01:13:14 PM

Author Topic: [bb] say something or ask something to the user by RemiD [ 1+ years ago ]  (Read 432 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : say something or ask something to the user
Author : RemiD
Posted : 1+ years ago

Description : to say something to the user, to ask something to the user

Code :
Code: BlitzBasic
  1. Graphics3D(1000,625,32,2)
  2.  
  3. setbuffer(backbuffer())
  4. Say("Hello, welcome to this simple say/ask example program")
  5. TAnswer$ = Ask("What is your name ?")
  6. Say("Have a nice day, "+TAnswer+".")
  7.  
  8. End()
  9.  
  10. Function Say(Message$,ClearScreen%=True)
  11.  
  12.  If(ClearScreen = True)
  13.   ClsColor(000,000,000)
  14.   Cls()
  15.   Locate(0,0)
  16.   Color(125,000,250)
  17.  EndIf
  18.  
  19.  Print(Message)
  20.  Print("Press any key to continue")
  21.  
  22.  FlushKeys()
  23.  WaitKey()
  24.  
  25. End Function
  26.  
  27. Function Ask$(Message$,ClearScreen%=True)
  28.  
  29.  If(ClearScreen = True)
  30.   ClsColor(000,000,000)
  31.   Cls()
  32.   Locate(0,0)
  33.   Color(125,000,250)
  34.  EndIf
  35.  
  36.  FlushKeys()
  37.  TAnswer$ = Input$(Message)
  38.  ;DebugLog("TAnswer = "+TAnswer)
  39.  Return TAnswer
  40.  
  41. End Function


Comments :


Dabhand(Posted 1+ years ago)

 Erm, not to sound cheeky... But, am I missing something here?:/ *Scratches head*Dabz


RemiD(Posted 1+ years ago)

 it is for beginners... (there are worse codes than that in the code archives !)


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal