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.

Can I create a variable with a custom type (like HSC for highscores)?

create Custom highscores HSC type
0
Posted

Can I create a variable with a custom type (like HSC for highscores)?

0

Q: Is it possible to create a file which will have a custom type (i.e. which does not appear in VAR-LINK as a stanard type like STR, PIC, PRGM etc.). For example, I want to create a highscore file which will appear in VAR-LINK as HSC type… A: Christian Walther pointed to me that this is possible. Moreover, this is easy. All you need to do is to create a file of “other” type (i.e. which terminates with OTH_TAG). TIOS then expects that a real type name is stored just below OTH_TAG as a zero-started zero-terminated string of maximum 4 chars. Look the following code fragment as an example: FILE *fp = fopen (“example”, “wb”); // store anything you want in the file here fputc (0, fp); fputs (“HSC”, fp); fputc (0, fp); fputc (OTH_TAG, fp); fclose (fp); After this, you will have a file named “example” with type “HSC”: you will see it in the VAR-LINK dialog.

Related Questions

What is your question?

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