Jump to content

Format of VS for forum


Recommended Posts

Hi,

I've cut and pasted from the VS Editor several times and as I am writing this post I see the format is correct. ie "for" is left justified and "begin" is two spaces in as is Create, Set & end;

for i := 4 to 6 do

begin

CreateThreeStateCheckBox (DialogID, i, Concat (' ', i));

SetBelowItem (DialogID, i - 1, i, 0, 0);

end;

but when I hit "Submit", everything is left justified.

This is OK for above but when there are many more lines of code it becomes harder to read.

What am I doing wrong?

Link to comment

for i := LayerCount -1 downto 1 do

begin

h := NextLayer (h);

LayerName := GetLName (h);

end;

No luck Pat,

The original post was with spaces and the above is with spaces and "begin" has a tab.

I have previewed this reply after copying from VW, copy & paste through Word, WordPad & Notepad but nothing works. I even added spaces after pasting but everything in the forum seems to be left justified. Is there a switch I need to flick in My Stuff?

I have seen many people with my problem and I have also seen several comments from replies saying please format your code which is what I would like to do.

Any other ideas?

Link to comment

Ok, let me try this. I have indented the first version here with spaces in the forum editor.

for i := LayerCount -1 downto 1 do

begin

h := NextLayer (h);

LayerName := GetLName (h);

end;

Now I have switched to the Full Reply mode and put in a Code block (the # sign in the editor menu across the top) and indented using spaces.

for i := LayerCount -1 downto 1 do
 begin
   h := NextLayer (h);
   LayerName [i] := GetLName (h);
 end;

So, I guess you need to use the code block to get your indents to work right.

Link to comment

Who,

???If you've ever read any of my posts, you have seen I use indenting all the time.

Is this what you're looking for?

for i := 4 to 6 do

??begin

????CreateThreeStateCheckBox (DialogID, i, Concat (' ', i));

????SetBelowItem (DialogID, i - 1, i, 0, 0);

??end;

for i := LayerCount -1 downto 1 do

??begin

????h := NextLayer (h);

????LayerName := GetLName (h);

??end;

???As you've noticed, the TechBoard removes leading white spaces (Sp & Tb), and compresses multiple white spaces in the middle of lines to a single space character.

???The character you want to enter is Non-Breaking-Space (NBSP). On the MAC, use Option-Space. On Windows, try Alt+0160 or Alt+255 (on numeric keypad). The Windows info comes from Wikipedia, and I haven't tried it. Please, only do this for short code segments you want to post inline. For longer code blocks that other people might want to copy, preserve your tabbed formatting with the

[/code ] headers. Otherwise, people will have to convert your NBSP characters to Tabs, and that's a pain.

???As for using [kode] [/kode] (misspelled intentionally to prevent it from working), you need to place your CODE between the ] [ characters.

[b][kode] Your Code Here [/kode][/b] It will keep its formatting and be placed in a nice little gray box as seen in Pat's post.

Raymond

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...