CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 31 matches
CCS Forum Index
Author Message
  Topic: Condensing code problem.
rougie

Replies: 4
Views: 4168

PostForum: General CCS C Discussion   Posted: Thu Sep 03, 2009 3:43 pm   Subject: Condensing code problem.
Hello andrewg,

Okay, well I did group my structures differently and found a work around.

FWIW, malloc and free make me very uneasy. I've never used them in
any microcontroller project. They're ...
  Topic: Condensing code problem.
rougie

Replies: 4
Views: 4168

PostForum: General CCS C Discussion   Posted: Tue Sep 01, 2009 6:42 pm   Subject: Condensing code problem.
Hello,

I have been coding my project and seem to have created many functions which are exactly identical except for the pointer type that is passed in as the function parameter.

Now, as we all ...
  Topic: Assigning the base address of a 2 dim array to a pointer
rougie

Replies: 10
Views: 10544

PostForum: General CCS C Discussion   Posted: Fri Jul 31, 2009 7:50 am   Subject: Assigning the base address of a 2 dim array to a pointer
Hello FvM,

Well that sums that up!

Its been nice chatting with you, I wish you a nice day!

P.S. I thank you for your help!

Finest Regards
Robert
  Topic: Assigning the base address of a 2 dim array to a pointer
rougie

Replies: 10
Views: 10544

PostForum: General CCS C Discussion   Posted: Thu Jul 30, 2009 9:58 am   Subject: Assigning the base address of a 2 dim array to a pointer
Hello FvM,
I see that the common C syntax for typed pointers to an array isn't accepted by PCH, e.g.: "

Code:
long (*h1)
I thought so! I was able to create an explicit type pointer of that ...
  Topic: Assigning the base address of a 2 dim array to a pointer
rougie

Replies: 10
Views: 10544

PostForum: General CCS C Discussion   Posted: Wed Jul 29, 2009 5:18 pm   Subject: Assigning the base address of a 2 dim array to a pointer
Hi Fvm,


You can access the array elements by mapping them to a one-dimensional array

h = pmr; // Assign the array's base address to a pointer
t = h
Okay, that I am aware of!

But th ...
  Topic: Assigning the base address of a 2 dim array to a pointer
rougie

Replies: 10
Views: 10544

PostForum: General CCS C Discussion   Posted: Wed Jul 29, 2009 2:04 pm   Subject: Assigning the base address of a 2 dim array to a pointer
Hello,

I am using PCWH version 4.095 with PIC 18FL4685 and the programming language is C.

I would like to assign the base address of a two dimensional array to a pointer, and then use that poin ...
  Topic: Storing an array subscript to a member of a structure
rougie

Replies: 2
Views: 3105

PostForum: General CCS C Discussion   Posted: Mon Jul 27, 2009 2:06 pm   Subject: Storing an array subscript to a member of a structure
PCM Programmer,

My question is not related to function pointers. What I am trying to do is pass in the two dimensional array's base address (or subscript) into a function via a pointer of type

...
  Topic: Storing an array subscript to a member of a structure
rougie

Replies: 2
Views: 3105

PostForum: General CCS C Discussion   Posted: Mon Jul 27, 2009 11:18 am   Subject: Storing an array subscript to a member of a structure
Hello,

I have tried the following code in VC++ compiler as a .c module and it compiles without error or warnings and works the way it supposed to. Now, I know that C for PICs does not have the same ...
  Topic: 32 bit micro controller!
rougie

Replies: 0
Views: 2926

PostForum: General CCS C Discussion   Posted: Wed Mar 18, 2009 2:44 pm   Subject: 32 bit micro controller!
Hello,

Has anyone heard if or when CCS is coming out with a compiler for the new 32 bit micro controller from Microchip?

Regards
  Topic: Code problem with function pointers !
rougie

Replies: 9
Views: 11885

PostForum: General CCS C Discussion   Posted: Sun Jan 25, 2009 10:39 am   Subject: Code problem with function pointers !
Thanks FvM!

Your sample code regarding arrays of function pointers works!

I am using PCWH version : 4.083

Thanks again!

Roberto
  Topic: Code problem with function pointers !
rougie

Replies: 9
Views: 11885

PostForum: General CCS C Discussion   Posted: Sat Jan 24, 2009 4:14 pm   Subject: Code problem with function pointers !
>I don't guarantee that they can be made to work in an array of
>function pointers. It would require testing.

Disappointing!

Robert
  Topic: Code problem with function pointers !
rougie

Replies: 9
Views: 11885

PostForum: General CCS C Discussion   Posted: Sat Jan 24, 2009 9:04 am   Subject: Code problem with function pointers !
ooops!

I meant:

http://www.java2s.com/Code/C/Function/ArraysofPointerstofunctions.htm

But I see that it is declared in main() !!!!

Let me try something!

I'll get back!
  Topic: Code problem with function pointers !
rougie

Replies: 9
Views: 11885

PostForum: General CCS C Discussion   Posted: Sat Jan 24, 2009 8:58 am   Subject: Code problem with function pointers !
>Well first of all, i'm not sure that this is the right way to return an array >in a function call
>you should try:


http://www.java2s.com/Code/C/Function/Initializethefunctionpointera ...
  Topic: Code problem with function pointers !
rougie

Replies: 9
Views: 11885

PostForum: General CCS C Discussion   Posted: Fri Jan 23, 2009 11:49 pm   Subject: Code problem with function pointers !
Can someone point out why I am getting an error in this simple code fragment?

#include <Dv4685.h> // DEVICE INNITIALIZATIONS
#include <stdlib.h> // CCS LIBRAR ...
  Topic: Help for compiler error!
rougie

Replies: 0
Views: 1954

PostForum: General CCS C Discussion   Posted: Tue Jan 20, 2009 1:03 pm   Subject: Help for compiler error!
Hello, please consider the following code:


=================================== krn.h
typedef long *LRESULT;
typedef long WPARAM;
typedef long LPARAM;

typedef struct tagHwnd{
void *han ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group