编辑文件时出现问题 [英] Problem editing a file

查看:109
本文介绍了编辑文件时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我希望有人可以帮我这个!

我在编辑文本文件时遇到问题我的文件看起来像这样


11

13

15

16

23


我想一次读取一行文件,每行加0.5,这就是我用的脚本。

展开 | 选择 < span class =codeDivider> | Wrap | 行号

解决方案


您好,


我希望有人可以帮我这个!

我在编辑文本文件时遇到问题我的文件看起来像这样

11

13

15

16

23


我想一次读取一行文件,每行加0.5,这就是我使用的脚本。

展开 | 选择 < span class =codeDivider> | Wrap | 行号


我尝试了这个但它适用于某些数字但不是全部。输出看起来像这样我想在数字之间有一个标签。但我只能得到有两位数的数字,如果他们只有一个我只得到一个空格。


[ HTML]

11 0.5

12 0.5

1 0.5

2 0.5

5 0.5

22 0.5

44 0.5 [/ HTML]


尝试将以下两行添加到您的打印到新文件之前的代码:

展开 | 选择 | Wrap | 行号



我尝试了这个但它适用于某些数字但不是全部。输出看起来像这样我想在数字之间有一个标签。但我只能得到有两位数的数字,如果他们只有一个我只得到一个空格。


[ HTML]

11 0.5

12 0.5

1 0.5

2 0.5

5 0.5

22 0.5

44 0.5 [/ HTML]



嗨..

你的代码对我来说工作正常......无论数字是一位数还是两位数,我都会得到相等的数字空间。

展开 | 选择 | Wrap | 行号< /跨度>

Hello,

I hope someone can help me with this!
I have a problem editing a text file my file looks like this

11
13
15
16
23

I want to read the file a line at a time and add 0.5 to every line so this is the script i used.

Expand|Select|Wrap|Line Numbers

解决方案

Hello,

I hope someone can help me with this!
I have a problem editing a text file my file looks like this

11
13
15
16
23

I want to read the file a line at a time and add 0.5 to every line so this is the script i used.

Expand|Select|Wrap|Line Numbers


I tried this but it works for some of the numbers but not all. The output looks like this i want a tab in between the numbers.But i only get it for numbers who have two digits, if they have only one i get just a space.

[HTML]
11 0.5
12 0.5
1 0.5
2 0.5
5 0.5
22 0.5
44 0.5[/HTML]

Try adding the following two lines to your code before printing to the new file:

Expand|Select|Wrap|Line Numbers


I tried this but it works for some of the numbers but not all. The output looks like this i want a tab in between the numbers.But i only get it for numbers who have two digits, if they have only one i get just a space.

[HTML]
11 0.5
12 0.5
1 0.5
2 0.5
5 0.5
22 0.5
44 0.5[/HTML]

Hi..
Your code is working fine for me... and I am gettting equal space between the numbers no matter if they are one digit or 2 digit.

Expand|Select|Wrap|Line Numbers


这篇关于编辑文件时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆