xsharp.eu • ampersand (&) Kaufmännisches Und in VO
Page 1 of 1

ampersand (&) Kaufmännisches Und in VO

Posted: Wed Dec 07, 2022 1:02 pm
by Fulgorth
Hi @ all
I am quite new to XSharp and to VO as well. Please do not wonder why I have any interest in VO but I am working with a database program that used VO as User-Interface-Language with no documentation, no source code and no original programmers of the programm...I already found out that some VO funtions do not work inside the interface but others do. Unfortunately I am not even able to include own functions but at least it is possible to create modules and refer to them.

My real Project is to adjust this program using the user Interface to be able to transfer it bit by bit to a new selfprogrammed program.

Now my actual - maybe rather easy - question in regards to VO:

How do I include Ascii elements such as & to Strings in VO? Either by a function or by string controls. Best would be to know both ways.

What I actually know:
The Interface needs strings to be given inside "" or ''

Code: Select all

cText := "text" //resulting in: text
cText := 'text' //resulting in: text
making possible even:

Code: Select all

cText := 'text "including" quotationmarks' //resulting in: text "including" quotationmarks
when I give an ampersand the result unfortunately always gives an error.
I tested:
cText := "&"
cText := '&'
cText := ";&"
cText := "&&"
cText := "%&"
cText := "/&"
cText := "&"
cText := Ascii(38)

Please, if you have any VO source code snippets you could forward to me I would be glad to be able to reconstruct if used functions can be used inside the interface. I am pretty sure that actually I use quite bad workarounds as I just do not know the better functions to be used.

ampersand (&) Kaufmännisches Und in VO

Posted: Wed Dec 07, 2022 2:55 pm
by wriedmann
Hi Christian,
probably you are using a program that exposes the VO macro language to the user.
First thing to know: many functions don't work in the macro language. All strong typed functions don't work (but there is some exception).
And if the (untyped) function you need is not linked into the program then it will also not work.
Second: the ampersand has a special role in the VO macro compiler.
You could try to use chr( 38 ) for it.
Wolfgang

ampersand (&) Kaufmännisches Und in VO

Posted: Tue Dec 20, 2022 1:52 pm
by Fulgorth
Hi wriedmann,

perfect hints! The chr()-Function was a function I did not know by now. So this is as well a perfect example for VO-functions I am searching for.

While testing with the function I realized that although most characters work properly inside memo-fields the chr(10) does not work. Sometimes LF has to come together with another ASCII to really start the new row (But its a way too lang ago that I worked with single ASCIIs :-) ... any idea?

OT:
Could you (or someone else) give me a hint where to find a list of VO functions?

I know you are right and in this environment not every function is working but lots of them work indeed.
Especially in this moment I am seraching for a function that enables me to take a view into an Object. For example if oObject hat the structure:
oObject:oSubObject
oObject:cText
oObject:Method()
I do not always know the struction or every element of it. So a list function or a search would be great.

But I guess that makes sense to open another Topic for

BR christian

ampersand (&) Kaufmännisches Und in VO

Posted: Tue Dec 20, 2022 2:12 pm
by Fulgorth
Hi wriedmann,

perfect hints! The chr()-Function was a function I did not know by now. So this is as well a perfect example for VO-functions I am searching for.

While testing with the function I realized that although most characters work properly inside memo-fields the chr(10) does not work. Sometimes LF has to come together with another ASCII to really start the new row (But its a way too lang ago that I worked with single ASCIIs :-) ... any idea?

OT:
Could you (or someone else) give me a hint where to find a list of VO functions?

I know you are right and in this environment not every function is working but lots of them work indeed.
Especially in this moment I am seraching for a function that enables me to take a view into an Object. For example if oObject hat the structure:
oObject:oSubObject
oObject:cText
oObject:Method()
I do not always know the struction or every element of it. So a list function or a search would be great.

But I guess that makes sense to open another Topic for

BR christian

ampersand (&) Kaufmännisches Und in VO

Posted: Sat Jan 21, 2023 4:33 pm
by Fulgorth
Hi Wolfgang,

it seems my reply was not saved when I last time made it. So please accept my apologies for the late reply and thank you as the chr(nAsci) work really well and helped me a lot!

BR Christian

ampersand (&) Kaufmännisches Und in VO

Posted: Mon Jan 23, 2023 9:41 am
by ic2
Fulgorth post=24825 userid=7139 wrote:Hello Christian,

Could you (or someone else) give me a hint where to find a list of VO functions?
If you press F1 (Help) in VO and look under the tab Contents there's a chapter called Function Reference.

Dick

ampersand (&) Kaufmännisches Und in VO

Posted: Mon Jan 23, 2023 9:48 am
by wriedmann
Hi Dick,
Christian has no VO installation, but only an application that uses the VO macro engine.
Therefore he has no VO help.
Wolfgang

ampersand (&) Kaufmännisches Und in VO

Posted: Mon Jan 23, 2023 10:34 am
by ic2
Hello Wolfgang,

I didn't realize that. A function chapter can be found in the X# help too but you can't say for sure if a function is also in VO except when it says 'XSharp.VO' in the Assembly column. But many functions in other assemblies like XSharp.Core are also present in VO.

Dick

ampersand (&) Kaufmännisches Und in VO

Posted: Thu Jan 26, 2023 10:25 pm
by Jamal
Not sure if this will work for you. Try using [ ] instead of " "

cText := [&]

Jamal