Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 123 - 2505_CoreGPT(Podar)_Flipbook_C7
P. 123

    SAY Statement

                     The SAY statement is used to display a message or text on the screen using speech synthesis. It
                     allows the computer to "speak" the text out loud, provided that the system has text-to-speech

                     functionality enabled.

                     Syntax:
                     SAY "text"

                         ✶  text: The text or message that should be spoken by the system.

                     Program 15: To say HELLO FRIENDS with the SAY statement.

                     SOUND Statement

                     The SOUND statement is used to play a tone at a specific frequency for a given duration. It is
                     often used to create beeps, alerts or simple melodies.

                     Syntax:

                     SOUND <frequency>, <duration>

                     Program 16: To program plays a short beep Sound.bas.

                     This program plays a 600 Hz beep for 300 milliseconds and then prints a message on the screen.

                                                                                             Graphics in BASIC-256      121

| 118 119 120 121 122 123 124 125 126 127 128 |