Paste-bin.xyz
Archive
Sign In
Login
Register
Username
Current Password
Keep me signed in.
Username
Full Name
Email
New Password
TEXT
82
procedure makeline
Guest on 12th March 2023 09:13:27 AM
procedure makeline(f, stop_c, cl)
local line, c
static c_count
initial c_count := 0
line := ""
while c := reads(f) do {
if (c_count +:= 1) > cl then
break
if c == stop_c then
break
line ||:= c
}
return "" ~== line
end
Raw Paste
procedure makeline(f, stop_c, cl) local line, c static c_count initial c_count := 0 line := "" while c := reads(f) do { if (c_count +:= 1) > cl then break if c == stop_c then break line ||:= c } !highlight! return "" ~== line end
Login
or
Register
to edit or fork this paste. It's free.