• parsing example

    From Tracker1@VERT/RGRGUMBY to All on Tue Sep 5 13:11:00 2000
    I'd like to create a text string to parse through for displaying menus...ããI know, there are functions to use an external screen, but working on a commandãshell, that I'd like to have everything internal.. already have some of theãfunctions down, for like menu headers and prompts... but the parsing for theãmenu options is getting to me..ããalso, is there a way to get an internal @ code to translate... I created a subãthat will center a block of text in a given size, the only problem is that whenãI seem to use an @ code, it doesn't translate before the strlen goes.. :(ããanyways, back to the need at hand, an example on parsing a string would beãreally helpfull... :) there doesn't seem to be a means of getting a substring,ãor the position of a substring in a file.ããexample of what I want to parse...ããM,Message Menu;F,FileMenu;ããwould parse out to...ã[M] Message Menuã[F] File MenuãããAlso, any examples on reading in from a file would be great... :)ãã---ã þ Synchronet þ Rangergumbys Outpost - tracker1.darktech.orgã
  • From Digital Man@VERT to Tracker1 on Wed Sep 6 05:39:23 2000
    RE: parsing exampleãBY: Tracker1 to All on Tue Sep 05 2000 08:11 pmãã > I'd like to create a text string to parse through for displaying menus...ã > ã > I know, there are functions to use an external screen, but working on a commã > shell, that I'd like to have everything internal.. already have some of theã > functions down, for like menu headers and prompts... but the parsing for theã > menu options is getting to me..ã > ã > also, is there a way to get an internal @ code to translate... I created a sã > that will center a block of text in a given size, the only problem is that wã > I seem to use an @ code, it doesn't translate before the strlen goes.. :(ãã@-codes are expanded during printing only. Consider using one of the globalãvariables (listed in SBBSDEFS.INC) or a command-line specifier (listed inãAppendix A of SYSOP.DOC) instead.ãã > anyways, back to the need at hand, an example on parsing a string would beã > really helpfull... :) there doesn't seem to be a means of getting a substriã > or the position of a substring in a file.ããI've done this kind of thing before with a combination of compare_str andãshift_str.ãã > example of what I want to parse...ã > ã > M,Message Menu;F,FileMenu;ã > ã > would parse out to...ã > [M] Message Menuã > [F] File MenuããVery doable.ãã > Also, any examples on reading in from a file would be great... :)ããDid you look at FILE_IO.SRC?ããRobã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Amcleod@VERT to Digital Man on Wed Sep 6 09:42:40 2000
    RE: parsing exampleãBY: Digital Man to Tracker1 on Wed Sep 06 2000 12:39 pmãã > > Also, any examples on reading in from a file would be great... :)ã > ã > Did you look at FILE_IO.SRC?ããHehehe!ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Hax0r@VERT/HAX0RQWK to Digital Man on Wed Sep 6 12:52:00 2000
    RE: parsing exampleãBY: Digital Man to Tracker1 on Wed Sep 06 2000 12:39 pmãã > @-codes are expanded during printing only. Consider using one of the globalã > variables (listed in SBBSDEFS.INC) or a command-line specifier (listed inã > Appendix A of SYSOP.DOC) instead.ããActually, i'm working on something similar -- I'd like to do a compare againts ã@GRP and @SN but i havent seen any global vars or command line specifiers ãthat report back this info -- is there anyway to get it in for a compare?ããbasically I'm looking to have my main menu prompt either display the short or ãthe long description of the current msg board based on the group its in.ããshould be relatively easy to accomplish this, one i figure out how to get that ãinfo into my code ;)ããããã...A feature is a bug with seniority.ãã---ã þ Synchronet þ hax0r's palace - unknown-realm.dynip.com - you've been hax0r'dã
  • From Digital Man@VERT to Hax0r on Wed Sep 6 11:08:07 2000
    RE: parsing exampleãBY: Hax0r to Digital Man on Wed Sep 06 2000 07:52 pmãã > ã > > @-codes are expanded during printing only. Consider using one of the globã > > variables (listed in SBBSDEFS.INC) or a command-line specifier (listed inã > > Appendix A of SYSOP.DOC) instead.ã > ã > Actually, i'm working on something similar -- I'd like to do a compare againã > @GRP and @SN but i havent seen any global vars or command line specifiersã > that report back this info -- is there anyway to get it in for a compare?ããYou can use COMPARE_ARS to determine the current group/sub-board.ãã > basically I'm looking to have my main menu prompt either display the short oã > the long description of the current msg board based on the group its in.ã > ã > should be relatively easy to accomplish this, one i figure out how to get thã > info into my code ;)ããYes, I think COMPARE_ARS is what you're looking for.ããRobã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã