My code snipper in [code][/code] does not format correctly.
-
As the tittple says.
I enter :
[code]
char* blank_string(char*string, char ch){
int length = strlen(string);
memset(string,ch,length);
return string;
}
[/code]I get:
char* blank_string(char*string, char ch){
int length = strlen(string);
memset(string,ch,length);
return string;
}How can I make the code come out normally ? all of these
are meant to be line breaks.The blog I need help with is: (visible only to logged in users)
-
for some reason this forum decided to format my code -.-
<br />char* blank_string(char*string, char ch){<br /> int length = strlen(string);<br /> memset(string,ch,length);<br /> return string;<br />}<br /> -
Please provide the URL for the blog your are entering that code into in the form of an active link starting with http://
-
-
http://mereckasj.wordpress.com/?p=3
The code at the very bottom is the one I am talking about. -
Tanks for confirming the URL. I’ll tag this thread for a Staff follow-up re: your posting source code issue. Please subscribe to the thread so you are notified when they respond and please be patient while waiting.
-
P.S.if you have not located these already here are the links:
http://en.support.wordpress.com/code/posting-source-code/
http://en.support.wordpress.com/code/ -
Hi @mereckaj,
I’m not entirely sure I understand what output you’re looking for. Can you clarify a bit more? Are you looking for the line breaks to be actioned within the code to separate the code onto multiple lines like this?
char* blank_string(char*string, char ch){ int length = strlen(string); memset(string,ch,length); return string; }If so, you’ll need to remove the line breaks and manually insert the line breaks within the Text Editor for this to work.
Alternatively, if you’re looking for the line break attributes to be displayed within the code like so, it looks like everything is working correctly:
<br />char* blank_string(char*string, char ch){<br /> int length = strlen(string);<br /> memset(string,ch,length);<br /> return string;<br />}<br />The line breaks are displayed and are not actioned within the expression. Can you clarify what you’re looking to do?
-
-
- The topic ‘My code snipper in [code][/code] does not format correctly.’ is closed to new replies.