[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Sit! Speak! Good XyWrite!



Reply to note from Carl Distefano  Sun, 5 Dec 2010
19:08:47 -0500

> Enables XPL programs to display and speak error messages

I should have gone on to say that not only error messages but any
user-created PRompt in an XPL program ("") can be
translated into speech. Here's a (pseudo-code) example that displays
and speaks today's date:

BX es 1Q2 ;*; Error Suppression ON
;*;      (lest call to frame SPEAK destroy the PRompt)
;*;
>;*; Construct PRompt
;*;
;*; Display it
;*;
+"""">;*; Enclose it in quotes (to pass to SPEAK)
;*;
JM 2.speakQ2 ;*; Say it
;*;
;*; Exit

Same in "live" XPL (try running it at home):

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; Template for spoken PRompt (CLD 12/5/10)[cr|lf];*;[cr|lf]
[BX_]es 1[Q2_];*; Error Suppression ON[cr|lf];*;      (l
est call to frame SPEAK destroy the PRompt)[cr|lf];*;[cr|lf]{
<}SX50,"Today's date is "+{<}VA$DAMmmm d, yyyy{>}{>};*; Const
ruct PRompt[cr|lf];*;[cr|lf]{<}PR@50{>};*; Display it[cr|lf];
*;[cr|lf]{<}SX50,""""+{<}IS50{>}+""""{>};*; Enclose it in quo
tes (to pass to SPEAK)[cr|lf];*;[cr|lf][JM_]2.speak[Q2_];*; S
ay it[cr|lf];*;[cr|lf]{<}EX{>};*; Exit[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx