Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Beginner. How do I post code snippets in the forum.

Author
Message
paulfromaus
10
Years of Service
User Offline
Joined: 8th Oct 2014
Location:
Posted: 8th Oct 2014 06:30
G'day from Australia.

I have just downloaded Dark Basic Pro and have some questions.

First question relates to the forum.

How do I post code?

I can see the



Command, but where do I put the code, and how do I end the code in the forum posting, so that I can add normal text after the code snippet?

Thank you for your help.

Paul.


sync on : sync rate 0
MAXIMIZE WINDOW

rem set display mode desktopwidth,desktopheight,32,1
INK RGB(255,255,0),RGB(0,0,255)
color backdrop rgb(192,192,192)

for radius = 1 to 255

INK RGB(int(rnd(200)),int(rnd(255)),int(rnd(255))),RGB(0,0,255)
CIRCLE 300,300,radius
INK RGB(int(rnd(200)),int(rnd(255)),int(rnd(255))),RGB(0,0,255)
CIRCLE 400,300,radius
INK RGB(int(rnd(200)),int(rnd(255)),int(rnd(255))),RGB(0,0,255)
CIRCLE 500,300,radius
next radius
wait key

end
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Oct 2014 10:56
You need to click the code button twice to create a start and end tag. Then put your code in between. In the example below, I have added spaces to stop the tag from working so you can see it.

[code ]
sync on : sync rate 0
MAXIMIZE WINDOW
[/code ]



WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 8th Oct 2014 11:22 Edited at: 8th Oct 2014 11:29
You can depict how this is done without special characters and the explanation by entering this in the post.



Remove the space between & and #.

[code]
Insert code here.
[/code]

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Oct 2014 12:33
Useful to know, thanks.
I find it funny you had to enter spaces to show how it was done

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Oct 2014 17:13
Hey that is a WickedX solution

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 8th Oct 2014 18:11 Edited at: 8th Oct 2014 18:29
Yah, I was thinking I should add a 'lol' to the post. But, the ISO Latin-1 code is used everywhere, even in a code box and the edit box. Not realizing this at first, I already had to edit the post 6 times.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2014 16:40
[code]
Learn something new on this forum pretty much every day!
[/code]



Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 11th Oct 2014 06:16 Edited at: 11th Oct 2014 06:19
you can also get syntax highlighting by adding a lang parameter:

[code lang=dbp]
Insert code here.
[/code]



Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 20th Oct 2014 05:14
Beaten by Ortu! Syntax highlighting is awesome.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
lovecraft58
9
Years of Service
User Offline
Joined: 30th Nov 2014
Location: United States
Posted: 3rd Feb 2015 17:23
Anyone know why the arrowtrans.bmp does not show up? This is from "Hamds On DBPro".


Nick Z.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Feb 2015 17:36
lovecraft58, you need to create a new thread. This one is about posting code snippets on the forum.

Quidquid latine dictum sit, altum sonatur

Login to post a reply

Server time is: 2024-11-27 05:43:59
Your offset time is: 2024-11-27 05:43:59