Author Topic: Text() command Transform é into a Node  (Read 1381 times)

0 Members and 1 Guest are viewing this topic.

monliv

  • Newbie
  • *
  • Posts: 30
    • View Profile
Text() command Transform é into a Node
« on: October 28, 2023, 04:42:34 PM »
Hi Jean,
I include Napoléon Bonaparte's theme.

In the view on the right, the Text function prints the name incorrectly.
Transform the é into a Node.
It's not a big deal...
Would you know how to correct this visual anomaly?
Thanks.
« Last Edit: October 28, 2023, 04:44:51 PM by monliv »

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1170
    • View Profile
Re: Text() command Transform é into a Node
« Reply #1 on: October 28, 2023, 05:46:03 PM »
Hi Livio,

Yes, that's a design error. I have used part of the font to display astro symbols in stead of diacritics.
i'm not sure what to do about it :(
Greetings from Groningen Netherlands <º)))><¸.·´¯`·.¸><(((º>

monliv

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Text() command Transform é into a Node
« Reply #2 on: October 28, 2023, 07:39:22 PM »
I understand...., no problem, thanks anyway
Livio

monliv

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Text() command Transform é into a Node
« Reply #3 on: December 04, 2023, 12:22:56 PM »
Yes, that's a design error. I have used part of the font to display astro symbols in stead of diacritics.
i'm not sure what to do about it


Hi, Jean,
Could you generate in astrobasic a new command like 'text'
but that does not change the diacritical characters?

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1170
    • View Profile
Re: Text() command Transform é into a Node
« Reply #4 on: December 04, 2023, 12:45:36 PM »
Yes. From the help for command(TEXT,

17 sets the font, example char s[22]="Ariel"; command(TEXT. 0, 17, &s);

This is actually a good solution to my design error. except you can't use symbols.
And there is also memo() and list().

ps you have to update for this.
Greetings from Groningen Netherlands <º)))><¸.·´¯`·.¸><(((º>

monliv

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Text() command Transform é into a Node
« Reply #5 on: December 06, 2023, 07:20:20 PM »
The third parameter is accepted only if it is numeric.
If I understand correctly, in the string s, I should enter the desired font.
Can you explain the command better? Thank you

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1170
    • View Profile
Re: Text() command Transform é into a Node
« Reply #6 on: December 06, 2023, 09:15:43 PM »
In the astrobasic help, look at 'pointers'.

Yes, the name of the font should be in 's'.

command() only accepts integers, numeric. But using pointers enables one to use other types by giving not the variable, but the address of the variable. This is a concept from c/c++ and assembly, pointers are very common there. You already used them in memval() where you have a pointer to the structure from memget().
It is a difficult subject to get your head around at first, but it is very powerful.
In this case it enables me to use command() for other things besides integers.

ps I noticed an error in above example, correct syntax is
command(TEXT, x, 17, &s)
x is the number of the text control.
Greetings from Groningen Netherlands <º)))><¸.·´¯`·.¸><(((º>