-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BETTY WARNING: "unnecessary whitespace before a quoted newline" #18
Comments
Have you tried escaping the whitespace? Or, quoting the space itself? |
White space?!? I've been trying to escape white space my whole life! Ha! I'm thinking that escaping whitespace is more relevant in the context of bash scripting ... less so in a C program, unless I am building a string to pass into the shell. I guess what I'm saying is that I think this Betty warning is legitimate in other contexts, but less so in the context of defining a macro. |
white space has been painting my brain white and chunky leading to different warnings |
Please can anyone suggect on how i can remove this trailing whitespace error? |
white space means for you to delete and space before or after your typed
code
example :1 is the number line followed by space as white space and another
1. with a tab for indentation
1. printf("Chime Kingsely); this is wrong in betty style
below used of a tab of 4 space indentation
1. printf("Chime Kingsely);
…On Thu, Oct 20, 2022 at 2:36 AM Chime Kingsley ***@***.***> wrote:
Please can anyone suggect on how i can remove this trailing whitespace
error?
—
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZYIH67X3BZSIBK4VYOYEX3WECOYFANCNFSM4DSI3UIQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
usually check line by line whether there is an extra whitespace in the beginning or end. You must know how many whitespace you have to handle since the compiler does tell in case you have a debugger for it. |
root@ca08fbc1980a:~/alx-low_level_programming/0x01-variables_if_else_while# betty 2-print_alphabet.c ========== 2-print_alphabet.c ========== |
@nyambuukim Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline. |
2-print_alphabet.c:15: ERROR: trailing whitespace |
Not a huge issue, but the following line triggers a warning from betty:
#define DELIM " \n\t"
... see the warning as quoted in the subject ...
I do a workaround by placing the space character between the newline and tab chars like so:
#define DELIM "\n \t"
The text was updated successfully, but these errors were encountered: