Add large numbers in C or Flowcode

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Add large numbers in C or Flowcode

Post by Desdewit »

I need to add two large 6 digit numbers and print the answer on LCD the answer will never be more than 999999.
Ben suggested that I use a signed long varx; in C & also edit the PrintNumber (for LCD) but I'm still new to C & need some more help.
Is there any way to do this in flowcode or any samples that I can use except the one’s all ready on this forum?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Add large numbers in C or Flowcode

Post by Benj »

Hello,

What's wrong with the previous topic and the updated Flowcode LCD component C file I sent you to print out longs?

If you need access to the v4 forum then you can join by looking here:

http://www.matrixmultimedia.com/support ... =602#p1235

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Add large numbers in C or Flowcode

Post by Desdewit »

Hi Ben

Sorry about the confusion.
I'm not sure what's going on, but the last three post's we did under the subject "7bit ASCII with odd parity" in the E-Blocks section are not on the forum so I did not receive your last answer.
Can you please post it again if possible?

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Add large numbers in C or Flowcode

Post by Desdewit »

Hi Ben

:? Me again... Still can not get the 16F877 to add two 6 digit numbers & print to LCD except if I cheat.
Please let me know what you think about my cheating method and if it will work right up to 1000000.
Attachments
Large Numbers.fcf
(8 KiB) Downloaded 414 times

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Add large numbers in C or Flowcode

Post by DavidA »

Hello,

If you are posting Flowcode v4 programs, please post in the Flowcode v4 forums, if you are unable to do so, your account will need upgrading to allow access to this subforum.

A walkthrough is located here:

http://www.matrixmultimedia.com/support ... f=29&t=602

After your forum account has been upgraded either post here or PM me and i will move this topic to the relevant forum.

Post Reply