TI99 Environment

SETNUMBER


Syntax

integer-variable = SETNUMBER(ascii-code)

Description

This function calculates and returns the color set number corresponding to parameter ascii-code.


  Example Code
` View set numbers and characters.  
  CALL_CLEAR()
  call_magnify(2) 
  hxdef$ = rpt$("e",16)
  call_charload()   ` Hollow ball - ASCII 39
  call_char(endchar + 1,hxdef$)
  call_sprite(maxsprites,39,rnd(13)+3,96,128,0,0)  
  CALL_SCREEN(2) 
  for i = 2 to 8 : call_color(i,16,2) : next i
  tiwaitkey()
  for i =128 to endchar  step 8
    display_at(24,1,"ASCII:" + str$(i) + "   SET:" + str$(SETNUMBER(i)),0)
    call_char(i,hxdef$)
    call_char(i+1,hxdef$)
    call_color(setnumber(i),rnd(13)+3,rnd(13)+3)
    call_colorchar(i,rnd(13)+3,rnd(13)+3)
    call_hchar(1,1,i,32) 
    call_hchar(2,1,i+1,704)
    tiwaitkey()
  next i
  tiwaitkey()
  call_clear()
  call_screen(8)
  tiwait(500)
  tiwaitkey()
  end
  
 Note: Make sure to copy the following data under the _CHARLOAD label in your main program file before compiling the code above.
  
  ` Hollow ball - charload
 data 39             ` ASCII code
 data "  xxxx  "      ` Line 1 bit pattern
 data " x    x "      ` Line 2 bit pattern
 data "x      x"      ` Line 3 bit pattern
 data "x      x"      ` Line 4 bit pattern
 data "x      x"      ` Line 5 bit pattern
 data "x      x"      ` Line 6 bit pattern
 data " x    x "      ` Line 7 bit pattern
 data "  xxxx  "      ` Line 8 bit pattern

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020