| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| pic_user 
 
 
 Joined: 25 Aug 2005
 Posts: 16
 
 
 
			    
 
 | 
			
				| How do I format a message to fit within a box? |  
				|  Posted: Sat Aug 27, 2005 8:26 pm |   |  
				| 
 |  
				| I noticed posters here creating boxes with code in it, with the label CODE just above it. 
 I have highlighted some code, for example, and applied the "Code" button in the editor but it doesn't create the boxed effect.
 
 Can anyone tell me how to do it?
 |  | 
	
		|  | 
	
		| Guest 
 
 
 
 
 
 
 
			
			
			
			
			
			
			
			
			
 
 | 
			
				|  |  
				|  Posted: Sat Aug 27, 2005 8:50 pm |   |  
				| 
 |  
				| you must hit the code button which produces a little tag like [*code].  then insert your code, and again hit the button again and it will make a closing tag, like [*/code].  (minus the stars). 
 ie:
 
 [*code]
 while(true){
 foo();
 }
 [*/code]
 
 Alternatively, you can just type the tags by hand.
 |  | 
	
		|  | 
	
		| newguy 
 
 
 Joined: 24 Jun 2004
 Posts: 1924
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sat Aug 27, 2005 8:57 pm |   |  
				| 
 |  
				| What I usually do is cut & paste my code from the CCS editor, then highlight the code (click & drag).  Then hit the Code button.  It automatically inserts the proper code and /code strings this way. |  | 
	
		|  | 
	
		| valemike Guest
 
 
 
 
 
 
 
			
			
			
			
			
			
			
			
			
 
 | 
			
				|  |  
				|  Posted: Sat Aug 27, 2005 9:22 pm |   |  
				| 
 |  
				| I think you are cutting and pasting from an editor that doesn't insert carriage returns and line feeds. 
 Try using the CCS editor like mentioned in a previous post, or MPLAB's editor.
 
 other than that, you merely type "[c o d e]" (w/o the spaces) before the code snippet; then at the end of the code snippet (or the next line), type "[/ c o d e ]" (w/o the spaces)
 |  | 
	
		|  | 
	
		| Guest 
 
 
 
 
 
 
 
			
			
			
			
			
			
			
			
			
 
 | 
			
				|  |  
				|  Posted: Sat Aug 27, 2005 10:00 pm |   |  
				| 
 |  
				|  	  | Code: |  	  | Thanks for the help | 
 |  | 
	
		|  | 
	
		|  |