Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : @ ADMIN Paste of code text misses chars.
Author | Message | ||||
DuinoMiteMegaAn Senior Member Joined: 17/11/2011 Location: AustraliaPosts: 231 |
I pasted this and the "B" and "I" are missing! 120 PRINT "******************************************"
130 PRINT "* PIC32 DS3231 Time / Date Utilities *" 140 PRINT "******************************************" 150 PRINT "* [A] <-- Print PIC32 Time/Date *" 160 PRINT "* <-- Print DS3231 Time/Date/DOW *" 170 PRINT "* [C] <-- PIC32 RTC <--<<< DS3231 RTC *" 180 PRINT "* [D] <-- DST Daylight Savings Test Only *" 190 PRINT "* [E] <-- Spring FWD +1 Hr. DS3231 RTC *" 200 PRINT "* [F] <-- Fall Back -1 Hr. DS3231 RTC *" 210 PRINT "* [G] <-- DS3231 RTC <--<<< PIC32 RTC *" 220 PRINT "* [H] <-- Manual Set/Config. DS3231 RTC *" 230 PRINT "* <-- Print/Compare PIC32/DS3231 RTC *" 240 PRINT "* [J] <-- Print PIC32 DOW - Day of Week *" 250 PRINT "* [K] <-- Print PIC32 DOY - Day of Year *" 260 PRINT "* [M] <-- GoTo Main Menu *" 270 PRINT "* [Q] <-- Quit Menu *" 280 PRINT "******************************************" |
||||
James_From_Canb Senior Member Joined: 19/06/2011 Location: AustraliaPosts: 265 |
The [ B ] and [ I ] are being interpret as formatting commands (bold and italic). But it seems to be happening even if they are embedded in the code tags, like [ CODE ] (spaces added so you can see the start and end tags) 10 print "* etcetera " [ /CODE ] Not so good. And cut and paste snippets from those code blocks may be missing code. That could also explain why some listings have underlines, weird formatting and links displayed in them. James My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention. Hedley Lamarr, Blazing Saddles (1974) |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
[ B ] gets translated to bold and [ I ] to italics. See how everything first became bold then italicized? I don't know if that can be turned off for the code space. Micromites and Maximites! - Beginning Maximite |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
150 PRINT "* [A] <-- Print PIC32 Time/Date *" 160 PRINT "* [B] <-- Print DS3231 Time/Date/DOW *" 170 PRINT "* [C] <-- PIC32 RTC <--<<< DS3231 RTC *" Only by turning codes off completely :-( I can only think that you post the BASIC code in a follow up message with the formatting codes turned off. Not a good solution. Cheers Don... https://www.dontronics.com |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
I dont know of a easy solution for this. I could edit the software to ignore any [] tags between a [ CODE ] and [ /CODE ], but this means any post in the past that used formatting tags inside a code tag wont display correctly. I know there have been posts where the [ CODE ] tag was used to display tabulated data with the columns highlighted in bold. Formatting tags inside code tags can be handy, you may want to use a [ B ] tag inside a [ CODE ] tag to highlight a line of code, for example. I think its up to the posted to reconise their code has been formatted unexpectedly, and modify the code to remove forum tags. Or as Don suggested, switch off formatting with the "Enable Forum Codes to format post" option at the bottom of the edit window. Like I said, no easy solution, but a compromise. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
James_From_Canb Senior Member Joined: 19/06/2011 Location: AustraliaPosts: 265 |
Could you add a separate [purecode] tag that did not accept formatting? That would leave the old postings as they are, but allow new postings with 'untainted' formatting. James My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention. Hedley Lamarr, Blazing Saddles (1974) |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
[BBcode Tags] are endemic to the Internet, not just this site. Simple solution Edit all your BASIC code listings Use some other characters in your code examples i.e. [code] '{A} RTC initialise value '{BB} RTC Data Value [/code] and so on Why make Gizmo custom hack the Forum Script for this site (Possibly breaking it and comprising updates) when the problem is a simply poor choice of characters used in REM Statements and incorrect of Code tags. [quote=From Gizmo]I think its up to the posted to recognise their code has been formatted unexpectedly, and modify the code to remove forum tags. Or as Don suggested, switch off formatting with the "Enable Forum Codes to format post" option at the bottom of the edit window. [/quote] VK4MU MicroController Units |
||||
DuinoMiteMegaAn Senior Member Joined: 17/11/2011 Location: AustraliaPosts: 231 |
Edit all your BASIC code listings
Make my code listings so they won't cause formatting errors? If need be, I will bypass posting code and paste the code into a PDF. |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
Even better still, paste into a TEXT file so they can be used directly by renaming as .BAS files. What is this fascination with .PDF Files for Program files. VK4MU MicroController Units |
||||
DuinoMiteMegaAn Senior Member Joined: 17/11/2011 Location: AustraliaPosts: 231 |
What is this fascination with .PDF Files for Program files.
No fascination but OpenOffice is Free and to generate a PDF is a snap. |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
Generating Text files (MM basic files) are even easier. VK4MU MicroController Units |
||||
Print this page |