Short hand for line feed (ppl)?
|
03-13-2014, 02:28 PM
Post: #1
|
|||
|
|||
Short hand for line feed (ppl)?
Print(char(10)); works ok, but is there a short hand notation that can be used or embedded in a print command for creating a new line? Something like "/n" for example.
|
|||
03-13-2014, 02:57 PM
Post: #2
|
|||
|
|||
RE: Short hand for line feed (ppl)?
You can use "\n" in some cases, but not all commands recognize "\n"
Graph 3D | QPI | SolveSys |
|||
03-13-2014, 04:55 PM
Post: #3
|
|||
|
|||
RE: Short hand for line feed (ppl)?
Each PRINT is on a new line already.
So to have a blank line PRINT(""); Should do what you want. Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein |
|||
03-13-2014, 07:30 PM
Post: #4
|
|||
|
|||
RE: Short hand for line feed (ppl)?
Neither \n nor the "" approach seem to work when concatenated with additional info within a print command. (Something along these lines):
print( "something" + var +<some kind of newline shorthand> + "something else"); |
|||
03-13-2014, 07:54 PM
Post: #5
|
|||
|
|||
RE: Short hand for line feed (ppl)?
(03-13-2014 07:30 PM)DrD Wrote: Neither \n nor the "" approach seem to work when concatenated with additional info within a print command. (Something along these lines):PRINT is pretty limited, so the easiest way is: Code: print( "something" + var ); Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein |
|||
03-13-2014, 08:25 PM
(This post was last modified: 03-13-2014 08:27 PM by eried.)
Post: #6
|
|||
|
|||
RE: Short hand for line feed (ppl)?
(03-13-2014 07:54 PM)patrice Wrote: PRINT is pretty limited, so the easiest way is:Pretty limited for what? for drawing? for calculating? “Everything should be made as simple... you know the rest. Code: PRINT("Hello"+CHAR(10)+"World"); My website: ried.cl |
|||
03-13-2014, 09:10 PM
(This post was last modified: 03-13-2014 09:11 PM by Han.)
Post: #7
|
|||
|
|||
RE: Short hand for line feed (ppl)?
(03-13-2014 08:25 PM)eried Wrote:(03-13-2014 07:54 PM)patrice Wrote: PRINT is pretty limited, so the easiest way is:Pretty limited for what? for drawing? for calculating? “Everything should be made as simple... you know the rest. If we want something like "\n" for repeated use, and prefer to not have to repeatedly type CHAR(10), perhaps the following may be useful: Code:
Any future use of print that requires a newline character can simply use nl in place of char(10) -- smaller source file and less typing. Graph 3D | QPI | SolveSys |
|||
03-13-2014, 09:26 PM
Post: #8
|
|||
|
|||
RE: Short hand for line feed (ppl)?
You can press enter too :O
Code: PRINT("Hello or Code: PRINT("Hello"+" My website: ried.cl |
|||
03-14-2014, 12:59 AM
Post: #9
|
|||
|
|||
RE: Short hand for line feed (ppl)?
I like the idea of creating a variable to hold the new line string. That solution seems to produce all the desirable features I was after, and helps keep the program structure nice and tidy. Thank for that idea!
-Dale- |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)