Questions tagged [line-continuation]

For questions and topics related to programming statements and programming syntax. This relates to any sequence of characters, used to indicate where the end of the statement appears in the context of parsing, or lexical analysis, of source code files.

Overview

In computer science, lexical analysis, lexing or tokenization is the process of converting a sequence of characters (such as in a computer program or web page) into a sequence of tokens (strings with an assigned and thus identified meaning).

Line continuation

Line continuation is an element of lexical analysis.

It is a feature of some languages where a newline is normally a statement terminator.

Most often, ending a line with a backslash (immediately followed by a newline) results in the line being continued – the following line is joined to the prior line. This is generally done in the lexer: the backslash and newline are discarded, rather than the newline being tokenized. Examples include bash,[8] other shell scripts and Python.[9]

23 questions
0
votes
0 answers

Line continuation fortran 77

So I have to write this program in fortran77 wiith .f file extension and I dont want to compile it with an option. I want to fixed the error for but for some reason everythiing I've tried is still giving me this error. Ive included the code and the…
user12577766
0
votes
2 answers

Can't figure out the right way to break a long parameter to multiple lines

I've created a script to fetch json response from a website. To get the response I had to issue post http requests along with appropriate parameters. The script is doing fine. The payload that I've used within the script is substantially long. It…
SMTH
  • 67
  • 1
  • 4
  • 17
0
votes
2 answers

C: trying to split fprintf() format string into multiple lines with line-continuation using \ adds tabs at the beginning of lines that follow

I am trying to split a long format string to fprintf() into multiple lines using the \ character as shown below: fprintf(stdout, "This program take a date supplied by the user in dd/mm/yyyy format...\n\ And returns the day of…
user14381272
0
votes
2 answers

Is there a difference between backslash and triple quotes?

I understand that on string assignment that exceeds 1 line you can use either backslash, parenthesis or triple quotes. Is there any practical difference? Which is considered a better coding practice? For example: STR1 = """Peanut butter …
Or b
  • 666
  • 1
  • 5
  • 22
0
votes
0 answers

How to get rid of unwanted tabs in text on tkinter with python line continuation

I have the following code and when it shows in my GUI it includes the indentations for the code structure. How can i get rid of these? warningLbl = tkinter.Label(window, text = '!!This Tool Will not work with\ IVER builds!!',…
William C
  • 123
  • 1
  • 1
  • 5
0
votes
1 answer

Trouble shooting line continuation error for a long file path for read_csv

I am trying to break up a long file path so that I can read it without having to move the screen to see it. edgelist = pd.read_csv(r'https://gist.githubusercontent.com/brooksandrew' / r'/e570c38bcc72a8d102422f2af836513b/raw' / …
spacedustpi
  • 351
  • 5
  • 18
-1
votes
1 answer

I do not know how to pass this script through the CMD

I've instaled this script writen in python to delete tweets but i do not understand how to translate it so i can use it on windows $ tweet-delete \ --consumer_key= \ --consumer_secret= \ …
Hermi Bv
  • 53
  • 1
  • 9
-2
votes
1 answer

In python, how can I remove the last character in a print that is also using line continuation? Tried rstrip()

I'm having a difficult time removing the final character in my line continuation print loop. Not sure if rstrip() is the correct solution or not. It's my understanding that a ',' included at the end of a print statement i.e., 'print(),' will cause…
1
2