Article ID: 40889
Article Last Modified on 1/9/2003
APPLIES TO
- Microsoft QuickBasic Compiler for Macintosh 1.0
This article was previously published under Q40889
SUMMARY
The sample program below shows how to subscript and superscript a character on the screen from a Macintosh QuickBASIC program using the CALL MOVE and CALL TEXTSIZE routines. The CALL MOVE routine is used to change the relative vertical position of the text, and the CALL TEXTSIZE routine is to reduce the text size.
MORE INFORMATION
The following is a code example:
superscript% = 1 subscript% = 0 PRINT "hi" PRINT "hi"; CALL ssscript(subscript%,"hh") PRINT "hi" END SUB ssscript(script%,text$) STATIC default%=0 SELECT CASE script% 'determine script type CASE 0 'subscript y1delta%=+2 y2delta%=-2 CASE 1 'superscript y1delta%=-2 y2delta%=+2 CASE ELSE PRINT "INVALID ARGUMENT" EXIT SUB END SELECT CALL MOVE (0,y1delta%) 'move either up or down 2 CALL TEXTSIZE(8) 'reduce text size PRINT text$; 'display text without return CALL MOVE (0,y2delta%) 'return to original position CALL TEXTSIZE(default%) 'return to default text size ENDSUB
Additional query words: MQuickB
Keywords: KB40889