Compiling question
#1

Is it possible to compile a selected lines only ? if so show me how
Reply
#2

You mean you have a large script and from that large script you want to compile only 3-4 lines, for example?
It is possible, but you have to be careful will it work.

Use this: /* and */

Example:
PHP код:
new tmp[4], Floattmp2[4]/*, query[128]*/
query[128] will be ignored by the compiler because it's inside */ and */
Reply
#3

Quote:
Originally Posted by GloomY
Посмотреть сообщение
Use this: */ and */

query[128] will be ignored by the compiler because it's inside */ and */
Isn't commenting /* and */? (I'm not sure since I haven't touched the compiler in a long time)

You could add a // before your lines but make sure all your lines do change colour indicating that they have been commented.
Reply
#4

Commenting is when you use //
And it is only used for a single line, while /* and */ can be used for a whole script if you want to.
Reply
#5

Quote:
Originally Posted by GloomY
Посмотреть сообщение
*/ and */
It is /* and */..
You can comment out the lines below using // by making it a block and commenting out that block.

I have tried it on a C IDE. On Pawno? idk.
Reply
#6

For example, i want all the lines saved but the script is large yes, i need to compile only the selected lines, like texture edit, if i added the
PHP код:
/* & */ 
that will skip the lines i need.
Reply
#7

Quote:
Originally Posted by GloomY
Посмотреть сообщение
Commenting is when you use //
And it is only used for a single line, while /* and */ can be used for a whole script if you want to.
/* {CODE} */ Is also commenting. It is used for multi-line commenting or to comment mid-code.
Comments don't get compiled because the compiler ignores comments simply because comments are there for humans to read, not for the compiler.

EDIT: I should have mentioned what Pottus stated.
Reply
#8

This doesn't make much sense to do this unless you're trying to compile different compiles of a script for one reason or another. All these suggestions of using commenting bullshit is making me sick this is what you would use the pre-processor for and also your script should be divided into modules you can easily make most modules self compiling by again using the pre-processor #define / #if / #endif
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)