Browsing this Thread:
1 Anonymous Users
|
Re: Let`s learn how to code in C!
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
Does the K and R book go into depth about the C language?
Posted on: 2018/6/17 23:21
|
|||
|
||||
|
Anonymous
|
Re: Let`s learn how to code in C!
|
|||
|---|---|---|---|---|
|
Actually I don't have much money to buy expensive Books!
But google is your friend: https://www.google.de/search?q=C+Coding+Manual&rlz=1C1CHBF_deDE798DE798&oq=C+Coding+Manual&aqs=chrome..69i57j69i64l3.8799j0j7&sourceid=chrome&ie=UTF-8 |
||||
|
||||
|
Re: Let`s learn how to code in C!
|
||||
|---|---|---|---|---|
|
Quite a regular
![]() |
The C compiler does not understand different human languages, only it's own - the C language. In C a float has a '.' for the decimal point, as it does in maths in general so I'm afraid that if you want to add two floats you need to enter them with the dot for the decimal place.
So, how do you handle the different language formats for numbers (called a Locale)? You need to enter the value as a string or more technically an array of chars and then YOU have to process that string to convert it to the standard numeric format that the compiler is expecting to receive. There will be more than 1 way to do that, you could do it manually by looping over the string to replace the ',' with a '.' and then convert the string to a number, or no doubt there are library functions in the C language that will convert the string to a float taking into account the input locale (I genuinely don't know off hand). But the point is, if you want to enter two numbers in your own locale you will have to convert them. The C compiler won't understand them as-is. If you are serious about learning C then I would highly recommend buying a copy of "The C Programming Language" by Brian Kernighan and Dennis Ritchie (RIP). It is widely respected as the "go-to" book on the subject. I bought a copy when I was at night school in the mid 90's and it is still next to my desk all these years later. There are some aspects of C that will likely fry your brain at first (pointers and the like). If you're really lucky you'll get it quickly, if not, having the book handy will be helpful. I need it around from time to time because at the moment I do not work in C for a living (I used to around 2000 and also from 2012 - 2016). I also do not know if there are translated versions in, for example German or if that is even a problem?
Posted on: 2018/6/17 17:28
|
|||
|
||||
|
Re: Let`s learn how to code in C!
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
Cool.
I hope it goes well.
Posted on: 2018/6/17 4:11
|
|||
|
||||
|
Anonymous
|
Re: Trying to learn how to Code!
|
|||
|---|---|---|---|---|
|
Bump! *lol*
I have no clue how to solve that! I can enter Numbers in the format 3.14 but I don't know how to code it that I can enter 3,14 in german format! I have a friend that teaches me a little! If others here want to learn how to Program in c.. they can install vbcc Compiler on Amiga OS 3.1 and WinUAE and use this thread for Discussion! |
||||
|
||||
|
Anonymous
|
Re: Trying to learn how to Code!
|
|||
|---|---|---|---|---|
|
Solved!
Both Codes are correct! I found the Error you have to compile with the -lmieee Option Compile Command: vc -o microadd.exe microadd.c -lmieee then it works! |
||||
|
||||
|
Anonymous
|
Let`s learn how to code in C!
|
|||
|---|---|---|---|---|
|
Hello I have written a small Addition Program for Amiga Computers.. I managed that it runs with Integer but I don't know how to manage float Operations with vbcc!
This Code works:
#include <stdio.h>
But this don't:
#include <stdio.h>
The VBCC Compiler complains: Error 21 Reference to undefined symbol __ieees2d. vlink error I did it with WinUAE configured with a 68040 CPU!
Edited by AROS-Confidence1 on 2018/6/17 0:27:13
|
||||
|
||||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.






