0 Replies - 1144 Views - Last Post: 24 October 2009 - 11:33 PM

#1 paperclipmuffin  Icon User is offline

  • Disassembling...
  • member icon

Reputation: 13
  • View blog
  • Posts: 944
  • Joined: 16-April 09

Simple FreeBASIC Notepad

Posted 24 October 2009 - 11:33 PM

Description: Requires no libraries. Press ? to exit. There are no save/open file functions, although they would be relatively easy to add.Shows and records text typed. It keeps a variable called "text" as all text that has been typed, with "
" to signify spaces.
screen 15, 8, 2, 0
print "Loading..."
dim path as string
dim filenumber as integer
dim currentX as integer
dim currentY as integer
dim i as integer
i = 1
dim a as integer
dim b as integer
a = 4
b = 2
dim savex as integer
savex = 0
dim savey as integer
savey = 0
dim openx as integer
openx = 0
dim openy as integer
openy = 0
dim key as integer
key = 0
dim strkeypress as integer
dim text as string
dim lne as string
dim wlne as string
function sve(byval p as string)
    return 0
end function
function opn(byval p as string)
    return 0
end function
sleep 50
print "Loaded"
sleep 300
cls
color 3, 1
print "           Save (Crtl+S)   Open (Crtl+O)          "
color 2, 0
print "##################################################"
do
    print "#                                                #"
    i = i + 1
    if i = 16 then
        lp = 1
    end if
loop until lp = 1
print "##################################################"
color 1, 0
lp = 0
do
    strkeypress = getkey
    if strkeypress = 8 then
        
    elseif strkeypress = 13 then
        a = a + 1
        text = text & " 
" lne = "" wlne = "" else lne = chr(strkeypress) text = text & lne locate a, b wlne = wlne & lne print ; wlne end if if strkeypress = 63 then end end if loop sleep


Is This A Good Question/Topic? 0
  • +

Page 1 of 1