Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
46 user(s) are online (31 user(s) are browsing Forums)

Members: 0
Guests: 46

more...

Headlines

Forum Index


Board index » All Posts (nubechecorre)




Re: Passing a variable to function by reference
Just can't stay away
Just can't stay away


Thanks Salass00

Go to top


Re: Updater tool: latest releases and updates
Just can't stay away
Just can't stay away


Thanks for the updates

Go to top


Re: Passing a variable to function by reference
Just can't stay away
Just can't stay away


thanks for the answer, enlightening!

Go to top


Passing a variable to function by reference
Just can't stay away
Just can't stay away


I try to pass a variable by reference to a function and change its value. Inside that function it works but when I print the value of the variable outside the function the value is different.. I'd like to understand what I am doing wrong as I need it for my program..

I declare this variable as global plus the definition of two functions outside (before) the main function:

int a;
 
void change_sound_1
(int *);
void change_sound_2(int *);
 
.....


inside the main function i have this code:

switch(code)
{
     case 
0:
     
IDOS->Printf("Sound rate is: 11025\n");
     
change_sound_1(&sound_code);
     
IDOS->Printf("sound_code is:%d\n"sound_code);
     break;
 
     
case 1:
     
IDOS->Printf("Sound rate is: 22050\n");
     
change_sound_2(&sound_code);
     
IDOS->Printf("sound_code is:%d\n"sound_code);
     break;
}
 
break;


These are the two functions that I use to modify the int variable:

void change_sound_1(int *a){
    *
a=0;
    
printf("sound code is:%d\n", *a);
     *
a=*a+1;
    
printf("sound code is:%d\n", *a);
}
 
void change_sound_2
(int *b){
    *
b=0;
    
printf("sound code is:%d\n", *b);
    *
b=*b+2;
    
printf("sound code is:%d\n", *b);
}


But when i print the variable, for the second time, in the main function, it prints 0 (zero).. Shouldn't it print the the same value that the two functions print? as I have modified its value using the pointer??

Go to top


Re: Updater tool: latest releases and updates
Just can't stay away
Just can't stay away


Thanks! that's a great news! I update them immediatly!
may I ask you if do you plan to document the new infowindow.class? I am using it in my project and it was very easy to understand how to implement it and use it (i saw the example inside the sdk:examples/reaction) but i would like to know how I can format the text.
By the way, you (and the developers) are doing a great work!

Go to top


Re: AmigaDeveloper.com Team Progress Update
Just can't stay away
Just can't stay away


Thanks for the update! Looking forward to download the next enancher software update!

Go to top


Re: BOH Deluxe and Huenison physical releases
Just can't stay away
Just can't stay away


great news Saimo,
I have to upgrade my BOH purchase. Should I send you an email to get the upgrade?

Go to top


Re: 2018 AmigaOS 4.x Graphics Card Survey
Just can't stay away
Just can't stay away


Done

Go to top


Re: VICE 3.1 locking up my X5000
Just can't stay away
Just can't stay away


sorry to hear that.. hope that now everything is fine and that you did a backup!

Go to top


Re: VICE 3.1 locking up my X5000
Just can't stay away
Just can't stay away


vice crashes also here on my Sam440ep...

Go to top


Re: RunInUAE r8 beta 6 (JIT) please test!
Just can't stay away
Just can't stay away


Hi White, can you tell me your hardware configuration that use with Ruae?

Go to top


Re: AmiUpdate problem amigaos4.1 FE
Just can't stay away
Just can't stay away


Same problem here..

Go to top


Re: RunInUAE r8 beta 6 (JIT) please test!
Just can't stay away
Just can't stay away


Thanks Chris, btw i wasn't able to find the AmiGfx version. On OS4depot.net there is an AmiGFX version but in reality, when you unpacked it, is the 1.0.0 versin which use the sdl library

Go to top


Re: RunInUAE r8 beta 5 (JIT) please test!
Just can't stay away
Just can't stay away


Hi ChrisH, thanks for this update! i updated my previous installation of RUAE using the installation script but during the installation process it didn't ask me about UAE-SDL it only told me about UAE-Gfx.. How can I know if it downloaded any SDL version of UAE?
Thanks,
Davide

Go to top


Re: Graphic Cards
Just can't stay away
Just can't stay away


@utri007

thanks for the links! I would like to try the 32bit pci to pci-express adapter on my Sam440ep mini itx as the pci slot is 32bit and not 64bit. The 64bit pci lane is used for the onboard gfx graphic chip, the M9.. If this adapter work, which graphic card should I buy?

Go to top


Re: Amiga Users & User Groups
Just can't stay away
Just can't stay away


Thanks

Go to top


Re: RunInUAE r8 beta 4 (PPC JIT v1.0.0)
Just can't stay away
Just can't stay away


Thanks

Go to top


Re: Amiga Users & User Groups
Just can't stay away
Just can't stay away


I tried to install the japanese font and keyboard that i found on os4depot but it doesn't work with owb.. I set OWB with utf-8 support up but it didn't work... any hint on how to display japanese font?

Go to top


Re: Amiga Users & User Groups
Just can't stay away
Just can't stay away


Thanks for the list. Just a quick information. I tried to visit the japanese user group site and I miss the japanese font for owb and,I guess, also for the system.. are they available for amiga os?

Go to top


Re: Spammer in comments
Just can't stay away
Just can't stay away



Go to top



TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 75 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project