Jump to content

Numbers format


Recommended Posts

I'm sorry if the solution is in the help file, but as a French I don't know what keyword to seek.

I want to change the format of a number to print only the part before the comma on the screen ( $size is equal to 70.xxxx and I just wanna see 70 on the screen). Does anyone know what is the syntax?

Thank you for help, and sorry again if I could find the answer in help file.

Link to comment
Share on other sites

Same kind of problem to find how to go to next line in a string (as '\n' do in C/C++), to have 2 lines in a MsgBox(). I don't know the word to say "go to next line and go to the beginning of the line" in English (equivalent to ENTER in a text file).

Link to comment
Share on other sites

Same kind of problem to find how to go to next line in a string (as '\n' do in C/C++), to have 2 lines in a MsgBox(). I don't know the word to say "go to next line and go to the beginning of the line" in English (equivalent to ENTER in a text file).

<{POST_SNAPBACK}>

=) It's '\n' character... Feel kind of stupid right now
Link to comment
Share on other sites

@CR

Carriage return, Chr(13); sometimes used for line breaks.

@LF

Line feed, Chr(10); typically used for line breaks.

@CRLF

= @CR & @LF ;occasionally used for line breaks.

MsgBox(4096,"Hello","Hello" & @CR & "440LVB!")
Edited by Burrup

qq

Link to comment
Share on other sites

@CR

Carriage return, Chr(13); sometimes used for line breaks.

@LF

Line feed, Chr(10); typically used for line breaks.

@CRLF

= @CR & @LF  ;occasionally used for line breaks.

MsgBox(4096,"Hello","Hello" & @CR & "440LVB!")

<{POST_SNAPBACK}>

$affich = StringFormat("Utilisé sur N: %i Mo \n\nEspace restant : %i\% \n",$size,$prct)
works well.

Thank you

Link to comment
Share on other sites

I'm sorry if the solution is in the help file, but as a French I don't know what keyword to seek.

I want to change the format of a number to print only the part before the comma on the screen ( $size is equal to 70.xxxx and I just wanna see 70 on the screen). Does anyone know what is the syntax?

Thank you for help, and sorry again if I could find the answer in help file.

<{POST_SNAPBACK}>

If you search for foramt in the help you get at the first "StringFormat" that's what you need I believe.

StringFormat("n=%d",$v)

You have other functions to do conversion or rounding :(

Link to comment
Share on other sites

Same kind of problem to find how to go to next line in a string (as '\n' do in C/C++), to have 2 lines in a MsgBox(). I don't know the word to say "go to next line and go to the beginning of the line" in English (equivalent to ENTER in a text file).

<{POST_SNAPBACK}>

@LF, @CR or @CRLF are macro that's can be used to generated the desire string

"line1" & @CRLF & "Line2" :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...