Sending two adrress of variable in the same time

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Sending two adrress of variable in the same time

Post by Kwai chang caine »

Hello at all :D

Since several version FRED decided to change the string parameter by his adress :(

Before

Code: Select all

CallFunction(0, "SayHello", "I'm KCC")
Now

Code: Select all

CallFunction(0, "SayHello", @"I'm KCC")
But sometime, i send in parameter a summing of two string

Before i do this

Code: Select all

Variable.s = "the chain and ball"
CallFunction(0, "SayHello", "I'm KCC" + Variable)
Now, i'm forced to do this

Code: Select all

Variable.s = "the chain and ball"
Temp_Variable.s = "I'm KCC" + Variable
CallFunction(0, "SayHello", @Temp_Variable)
Is it possible to send the two adress in the same time, for send the summing of the two variables ???? :roll:

Thanks and good day
ImageThe happiness is a road...
Not a destination
Fred
Administrator
Administrator
Posts: 18249
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Sending two adrress of variable in the same time

Post by Fred »

If you stop using the deprecated callfunction() and use prototypes as it's now recommanded, you will not have these kinds of problems. You have to use an intermediate variable for this.
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Sending two adrress of variable in the same time

Post by Little John »

Fred:

Also in the German forum, there are repeatedly questions concerning CallFunction(), and the standard answer is: better use prototypes instead.

If someone uses e.g. CreateGadgetList() which is also deprecated, the compiler raises a warning.
Maybe it would be useful, when the compiler would raise a warning also in case of CallFunction(), and inform the programmer better to use a prototype? Just an idea.

Regards, Little John
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Sending two adrress of variable in the same time

Post by Kwai chang caine »

Thanks FRED for your quick answer 8)
If you stop using the deprecated callfunction()
I know that, you have say numerous time that call function is out :roll:

But i swear by what I hold most dear, i do not expressly
How can i explain to you, that i try, i try and try again to listen you or other MASTER members and i can't :oops:

Have you never had in all your school period, a little man, at the bottom of the class, with glasses, and that it would smack because he does not understand anything :twisted:
"A head of smack" what, like we say in french :evil:

When the teacher explain a thing, everybody have the smile in his face, but him....to look worried frown, chewing on her pencil... :oops:
A little man, where every day, you want to shake him unhook the pulp from the bottom :?
The sensation of all the dogshit of the word, is in the same person :?
So if you never know this, it's because you have never go in the same class that me :mrgreen:

I have stop the school the more fast possible, because me...it's in my hands that i have the power 8)
But i want have the power of brain...not the power of hammer, screwdriver, chain saw, trowel, post soldering :?

How can i explain to you, that if i don't use this splendid prototype, if because it is at least ten time i try to use it, and never understand

Can i allow me, to remember the first line of french doc of PB, about prototype
The doc wrote:Pour les programmeurs chevronnés
And KCC is all, except "programmeurs" and much less "chevronnés" :lol:
"Handicapé" would rather the most appropriate word to define KCC :mrgreen:
So i also understand that you can't create a langage for just KCC and JB13 :roll:

CallFunction is simple, so it's also a reason because i have choose PB at the beginning.
Use and call a DLL, is also simple that call a internal procedure :shock:
Thanks PB, KCC can play in the court of MASTERS
Why believe you, i have at least 30 books on the C and C++, i dream a day to create just a little program since 20 years, and never write one line with it ???
For the same reason that i can't use prototype :oops:

I know that thanks to PB, this forum, and you all, i can speak to the top of man programming...
But can speak with you (And again SROD....understand only the half of what i say :oops: and it's already a feat 8) ) not say have the same level.....

If PB is a school, since a long time KCC is set out with a kick in the ass :evil:

I don't want scare you....but prototype is not the only thing, i don't use because i have not all understand, and i want understand before use, if not, how can i fix a bug when i don't understand what i write :oops:
Tailbite / Interface / Thread / Macro / Pseudotype / Linked list / .......

The advantage with client like me..is that you should finish your splendid update language for at least 3 years, and you could leave on the Riviera
For me the v4.20 was more than enough :oops:
Except perhaps "The return of the line", "The useGifEncoder" :roll: :mrgreen: :lol:

So, if i say all that to you, it's because i love you too much, and don't want that you believe, i do all that for disturb you, laughing, or "ANNOYING" you :oops: :oops:
If you believe that, i have really too much trouble :oops:
The reality it's that Kcc is not enough strong for the C....for PB too...and even not for the VB :oops: :oops:

But KCC love programming....since 16 years old :D
It's not because KCC love programming, that the programming love KCC, it's a love at only a sens :?

Excuse me again to make you waste your time and that of all my heroes of this forum.
But what do I do ????
Stop programming ???
Change language yet, for a simpler, the QBASIC for exampler ???

Then, you surely do not believe me, but i fight every day, the truck mixer that my brain, to come follow you all ... even from a very big distance ... but to be a bit more with you all my heros,..... nothing that a little bit :oops:

Me....., my heros is not David Ortiz, MARADONNA, Tony parker, ZIDANE, Johnny hallyday, tom cruise, cameron diaz, bruce willis....
It's Kevin Mitnick, steeve job, FRED, FREAK, BERICKO, ANDRE, SROD, SPARKIE, NETMAESTRO, TsSOFT, KIFFY, LNA(Perhaps a little preference for her :lol:), GNOZAL, FLYPE, IDLE, RASHAD, OLLIVIER, LSI, CASE, DJES, RENFIELD ...and too much more.....
It's perhaps surprising that a programmer can be an IDOL at the eyes of someone :shock:
But it's like this... you should make you have this idea !!! :D
Some love the flower, the cow, the horse, the money...but KCC love the programmer :mrgreen:

Each place have his "chain and ball"......you can be happy my dear FRED......you have one too :lol:
You are a king of programming....so like i say that at FLYPE one time.....
A king is not really a king without his JESTER !!! :mrgreen:

I wish you a good day when even :oops:
Your fan...
Kcc
ImageThe happiness is a road...
Not a destination
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Sending two adrress of variable in the same time

Post by PB »

Kwaï chang caïne wrote:When the teacher explain a thing, everybody have the smile in his face, but him....to look worried frown, chewing on her pencil... :oops:
A little man, where every day, you want to shake him unhook the pulp from the bottom :?
The sensation of all the dogshit of the word, is in the same person :?
:lol: The poetry, the humor, the translation... KCC, you are truly absolute COMEDY GOLD! :mrgreen:
When are you going to stop messing with PureBasic and start doing stand-up for a living? :D
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Sending two adrress of variable in the same time

Post by Kwai chang caine »

Thanks a lot PB.... 8)
It's really a honor to make you a smile :D
Furthermore that you are also one of my hero :wink:

It's perhaps a little bit too long like explanation, but i just hope this time, the great FRED have understand why, i don't use the "protothings" :lol:
But i don't abandon the fight....i retry surely an eleven time, to use prototype :?
Perhaps it is the good :mrgreen:

Again thank you for your compliment me go straight to the heart 8)
Last edited by Kwai chang caine on Sat Jul 24, 2010 5:48 pm, edited 1 time in total.
ImageThe happiness is a road...
Not a destination
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Sending two adrress of variable in the same time

Post by ts-soft »

Kwaï chang caïne wrote:"i don't use the "protothings"
false answer!
"i will learn to use prototypes" is the right answer :wink:
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Sending two adrress of variable in the same time

Post by Kwai chang caine »

Oooohhhh !!!! My super hero TsSoft is here too :shock:
TsSoft are so kind with KCC 8)
Master TsSoft wrote:"i will learn to use prototypes"
Kcc want learn.....but never found teacher...all the teacher of KCC disapears after one day of school ...i don't know why .... :roll:

I have an idea.....i go to the splendid country of deutchland...it's easy, i leave not really far :D
And you give to me a big lesson on the prototype :mrgreen:
In exchange of your lesson, i give you sausage, pate, Rillette, wine of my country :wink:

You see that...it's again more simple to learn walking at a flowerpot, that learn PB at KCC :mrgreen:
if you can do it, you can open the first university to animals :lol:

I already say that to you, but i know say :"Die rechnung bite" in the restaurant...oooouuuaaaahhh you are surely very impressed :shock: :lol:
And "Ich liebe dich"...and "Kommen mit mir zu Bett" and "Apfesaft" because during one year for the army, i have try to learn the deutch...with a book and a walkman with cassette :D
But KCC is at the top in deutch...like with PB :mrgreen:
Last edited by Kwai chang caine on Sat Jul 24, 2010 6:16 pm, edited 1 time in total.
ImageThe happiness is a road...
Not a destination
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Sending two adrress of variable in the same time

Post by ts-soft »

deutsch :wink:
and i can't wait to drink wine of your country and eat some frogs' legs (but not from netmaestro :wink: )
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Sending two adrress of variable in the same time

Post by Vera »

Dear Kwaï chang caïne,

I liked to read everything you wrote 'though it's not adressed to me.

Please have no doubt to be a precious member of mankind and not less to the PureBasicCommunity :)

As beginner I stand right beside you to ask the same question. I have not advanced to prototypes yet and would also prefer to use the old way. The help doesn't say that CallFunction() is deprecated and might be removed in near future versions. It only recommends to use a now available more flexible way.

Looking at the example I must confirm it's kind of impossible to divert how it has to be used in a real situation.

Therefore I would have two requests to the community:
1 - is there a workaround to still use CallFunction() like it is requested in the first posting ?
2 - could someone state an understandable example (or two) showing the usage of prototyp replacing the older OpenLibrary() and CallFunction()

with regards ~ Vera
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Sending two adrress of variable in the same time

Post by Kwai chang caine »

My deutch hero wrote:deutsch
Sorry for the S :oops:
It's normal...i'm "FrencSh" :lol:

You like legs of frog ???? :shock:
Me too :oops: (Sorry MASTERNET)

My dream ....eat legs of frog with the great TsSoft 8)
So...i eat a little bit too much ...and with me....i can make "legless cripple" a entire army of frog :oops: with garlic and parsley :mrgreen:

For the wine...not too much....because for learning after ..... :roll:
I never go at berlin.....surely nice city :roll:
Just Freiburg ... :oops:
ImageThe happiness is a road...
Not a destination
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Sending two adrress of variable in the same time

Post by Kwai chang caine »

My friend wrote:Please have no doubt to be a precious member of mankind and not less to the PureBasicCommunity
If i have good understand, i thank you for this kind sentence, she go directly to my sad heart 8)

VERA i love you
Image

Finally another member who have problem with the prototype :shock:
I'm not alone....i'm not alooooooooone !!!! :D

FRED is so strong, that for him, prototype is so simple...just put this ...and that ....and that works :roll:

But KCC is the anti FRED :mrgreen:
Kcc put this .....and that.... :shock:
So reput this .....reput that :|
Rereput that with a little bit of that :?
And one day of this and that.....put the pc on the floor....and put his foot on the keyboard of that :twisted:

My problem, is that i have create a too big DLL.....so not too big for someone like my lover SROD...but too big for the little KCC :oops:
And now...KCC is like a mule with all this function to manage.

You are right....a little lesson for use the more simply the prototype, just for replace the callFunction
Because me, i love the callfunction, it's simple...like the brain of KCC :mrgreen:
ImageThe happiness is a road...
Not a destination
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Sending two adrress of variable in the same time

Post by Little John »

Vera wrote:I have not advanced to prototypes yet and would also prefer to use the old way. The help doesn't say that CallFunction() is deprecated and might be removed in near future versions. It only recommends to use a now available more flexible way.
The documentation of CallFunction() says:
This function is not very flexible and does not handle string/float/double/quad parameters or string/float/double/quad returns. The use of: prototypes is now strongly recommended.
Today, Fred wrote:If you stop using the deprecated callfunction() and use prototypes as it's now recommanded, you will not have these kinds of problems.
These are pretty clear recommendations, no? Of course, everyone is free to ignore them, but the s/he probably shouldn't complain about any problems.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Sending two adrress of variable in the same time

Post by Vera »

Little John wrote:These are pretty clear recommendations, no?
These are two recommendations

The first one (PB-help, in the name of Fred) does not exclude CallFunction() from beeing used.
On that one, one relies first and then ask the forum how one may use it further on.

The second recommendation is the first one to define CallFunction() as deprecated.
A recommendation is well meant but still no command and possibly a none accessible at a time.

So it's of no offence to ask for help and it's no refusal of the received hint. But you are out to make it one.

Vera
Post Reply