Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
8dbe8b67
Commit
8dbe8b67
authored
Nov 24, 2014
by
funshine
Browse files
add a lua module example myfile.lua
parent
2671c0c1
Changes
1
Show whitespace changes
Inline
Side-by-side
examples/myfile.lua
0 → 100644
View file @
8dbe8b67
--myfile.lua
local
myfile
=
{}
function
myfile
.
print
(
name
)
file
.
open
(
name
)
repeat
local
line
=
file
.
readline
()
if
line
then
line
=
(
string.gsub
(
line
,
"
\n
"
,
""
))
print
(
line
)
end
until
not
line
file
.
close
()
end
return
myfile
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment