Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it hard to display a PIC variable created from TI-Basic in C programs?

display hard PIC Programs ti-basic
0
Posted

Is it hard to display a PIC variable created from TI-Basic in C programs?

0

No, it is easy. It is enough to locate the variable (using SymFind for example), and to display its content using BitmapPut (its contents are just as expected by BitmapPut function). To be more concrete, look at the following function: short show_picvar (SYM_STR SymName, short x, short y, short Attr) { SYM_ENTRY *sym_entry = SymFindPtr (SymName, 0); if (!sym_entry) return FALSE; if (peek (HToESI (sym_entry->handle)) != PIC_TAG) return FALSE; BitmapPut (x, y, HeapDeref (sym_entry->handle) + 2, ScrRect, Attr); return TRUE; } The usage of this function is straightforward, for example: show_picvar (SYMSTR (“testpic”), 30, 30, A_NORMAL); assuming that “testpic” is the name of the wanted PIC variable. This function returns TRUE if the operation was successful, else returns FALSE (i.e. the picvar does not exist, or it is not a PIC variable).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123