|
Re: string conversion, format functions: msg#00338lang.erlang.general
> > B = 3. > > > > I want to form a string "0003". > > ** Can io:format generate such a printout ? Try 9> B = 3. 3 10> io:fwrite("~4.4.0w\n", [B]). 0003 ok integers are formatted using the 'term' format (~w), there's no need for an explicit 'integer' format. You can use io_lib if you want to generate strings rather than printing to output. Matthias |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: string conversion, format functions: 00338, Chris Pressey |
|---|---|
| Next by Date: | Re: string conversion, format functions: 00338, Shawn Pearce |
| Previous by Thread: | Re: string conversion, format functionsi: 00338, Chris Pressey |
| Next by Thread: | Re: string conversion, format functions: 00338, Chris Pressey |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |