----------------------------------------------------------------------
--- Knud van Eeden --- 10 October 2010 - 03:26 am --------------------
Computer: Editor: Text: TSE: File: Version: Control: Subversion: Program: TortoiseSVN: How to
===
According to my current knowledge, this are the minimum steps you have to do:
In a nutshell
1. -First create as usual once a repository directory somewhere ('md MYREPOSITORYDIRECTORY')
2. -Then initialize it via Tortoise ('create repository here')
3. -Create once as usual a working directory somewhere ('md MYWORKINGDIRECTORY')
4. -Checkout once into this working directory ('SVN checkout')
5. -Then copy any files you want to keep under version control to it,
now or later.
You will have to add each file copied the first time in there
once via the Tortoise menu.
6. -Each time you save a file in TSE you can save that file also into that
working directory.
Any new file copied in there will once the first time have to be
'added' via the menu to Tortoise, otherwise you have to do nothing
more.
7. -Each time you do a 'commit' of that file, which you probably only
do once in a while (but I do a commit it each time)
('SVN commit')
So indicating that you see that file as a candidate for the next
version. it will be seen as a next version for Tortoise.
---
This system of combining TSE with the TortoiseSVN Subversion client and
Microsoft Explorer really works OK and easy in my testing on my systems
to keep your files under version control.
---
That it is further a robust and stable system is probably proven by
the fact that I successfully use
-TSE
-TortoiseSVN
-external diff viewer program BeyondCompare
to keep e.g. my 400 megabyte working file under version control.
And that works really OK, fun, stable and fast (tens of seconds only for each
TSE save + commit action, and optionally doing a difference view).
---
The idea to automate it is to use your save action (optionally also but
not used here the file changed status) to do actions regarding version
control.
---
You could make it even more automatic during your save action by
checking if the file already exists (so in that way you implicitely
confirm that you want to keep that file under version control) in the
working directory, if yes then automatically adding it and starting
Microsoft Explorer to do the commit (so you always commit). But
currently I still keep answering yes to question of copying it to the
working directory and starting Microsoft Explorer.
---
The benefit of this sophisticated history maintaining backup like
systems (like Subversion, and otherwise CVS, GIT, Mercurial, Darcs,
Perforce, Bazaar, ...) is that it is a standardized system used by many
to keep you in many ways informed about changed file versions (in
graphs and difference checking, and the possibility to rollback to
previous versions. And if more than one is working on the same files
how to handle that and possibly merge changes).
---
Another advantage of using this system is that it will request
much less backup space.
As it only stores the original file once, and after that only the
*differences* with the later versions. You can imagine that that will
take much less space (if storing N backups of size S. Given that it
requires 10 percent of the file size to store the difference backup
then e.g.
--- cut here: begin --------------------------------------------------
S + ( 0.1 S ) . N =
S . ( 1 + 0.1 . N )
--- cut here: end ----------------------------------------------------
disk space. If e.g. doing 100 incremental backups of size 400 megabytes,
that will request
--- cut here: begin --------------------------------------------------
400 megabytes . ( 1 + 0.1 . 100 )
= 4400 megabytes, or about 4 gigabytes
--- cut here: end ----------------------------------------------------
If you instead store N full backups of size S, then that will always
cost you N . S bytes.
Thus using the example that will cost you
--- cut here: begin --------------------------------------------------
400 megabytes . 100 = 40000 megabytes
or thus about 40 gigabytes.
--- cut here: end ----------------------------------------------------
or roughly 10 times more space in this particular example.
===
You might assign the save key action to a key in your .ui file and recompile TSE
for a permanent solution for the saving so not having to think or remember too much.
That is what I do.
===
The typical steps worked out more:
You always work with minimal 2 directories.
One master directory (called repository, where the administration is
done, but *not* the files themselves are kept (actually only the
*differences* between versions, as that can be rather small to keep),
can be local on hard disk, further network drive and or online)
and one slave directory (called working directory, where the (changed)
files are kept, usually on local hard disk, further network drive, or online).
===
1. -Only once
1. -Create once or use repository directory
(local (file:///...) or on Internet (http://...))
2. -Add once (via the menu) all the filenames and or directorynames of
your choice and which you want to keep under version control
to this repository directory
You do not have to copy this files or directories physically
into this repository directory, only inform about their names.
To add the files, open the Tortoise Repo Browser (via the Explorer
menu, browse to the repository directory, and there in the
menu add the file.
3. -Create once or use local working directory.
That will contain the files themselves.
4. -Checkout once from the repository to this local working directory.
That will actively copy that chosen files and or directories
into it.
2. -Then repeat zero or more times
E.g. in your favorite text editor:
1. -Load one or more of this file(s) in the working directory
(e.g. in your favorite text editor)
2. -Do something with this file(s) (e.g. change)
3. -Save the file(s) back (with the *same* filename) to that
local working directory.
3. -Once in a while
do a commit.
Only then will your (changed) file be administered as a next version.
4. -Once in a while (when applicable)
-check the differences between versions
-view the revision graph
-check the log
-go back to a previous version
...
---
Even more details about the steps:
---
Steps: Overview:
1. -Download and install TortoiseSVN
--- cut here: begin ----------------------------------------------------- cut here: end ----------------------------------------------------
2. -That will install TortoiseSVN in Microsoft Explorer
3. -Run the program
--- cut here: begin --------------------------------------------------
Microsoft Explorer
--- cut here: end ----------------------------------------------------
4. -(Once only) add files to your repository
1. -You can use an existing repository directory
(e.g. locally on your harddisk
or
online at e.g. http://www.sourceforge.net)
otherwise you have to create an (empty) repository directory
1. -Create first then browse to (any) directory where you want to
create a repository
1. -E.g.
--- cut here: begin --------------------------------------------------
c:\TEMP\MYREPOSITORYDIRECTORY\
--- cut here: end ----------------------------------------------------
2. -Right click on that directory
3. -Select from list 'Tortoise SVN'
4. -Select from list 'Create repository here'
5. -Now (once) add all files names or directories names to it which you want to keep under version control
1. -Run Microsoft Explorer
2. -Right click on any directory
3. -Select from list 'Tortoise SVN'
4. -Select from list 'RepoBrowser'
5. -Optionally tell it where your repository is located
6. -Right click on the repository folder
7. -Select from list 'Add Files'
or
Select from list 'Add Directories'
8. -Now add this file names and or directories names which you want to keep under version control
1. -E.g.
--- cut here: begin --------------------------------------------------
c:\temp\myfile1.s
c:\temp\myfile2.s
c:\temp\myfile3.s
--- cut here: end ----------------------------------------------------
6. -After you now thus (once) collected and indicated which files to
keep under version control, you have to (once) 'checkout' this files
to (another) (empty) working directory
1. -Use or if applicable create (another) (empty) directory
1. -E.g.
--- cut here: begin --------------------------------------------------
c:\TEMP\MYWORKINGDIRECTORY\
--- cut here: end ----------------------------------------------------
2. -Now checkout to this directory
1. -Right click in Microsoft Explorer on this directory
2. -Select from list 'SVN Checkout'
3. -That will copy all the files which you earlier indicated into that directory
7. -Load e.g. one of this files in TSE
1. -E.g.
--- cut here: begin --------------------------------------------------
c:\TEMP\MYWORKINGDIRECTORY\myfile1.s
--- cut here: end ----------------------------------------------------
8. -Change something in this file and save it back (to the same location in that working directory)
--- cut here: begin --------------------------------------------------
c:\TEMP\MYWORKINGDIRECTORY\myfile1.s
--- cut here: end ----------------------------------------------------
9. -Tell that you have changed something
1. -Browse in Microsoft Explorer to this file in your working directory
--- cut here: begin --------------------------------------------------
c:\TEMP\MYWORKINGDIRECTORY\myfile1.s
--- cut here: end ----------------------------------------------------
2. -Right click on it in Microsoft Explorer
3. -Now you will see there is an option
'SVN Commit'
4. -Choose this option
10. Then by right clicking on the filename in Microsoft Explorer
choosing 'Tortoise SVN'
you can e.g. (in your RepoBrowser choose the options
'Show log', 'Revision graph', 'Show difference', ...)
1. -Show the difference between different versions of your program
(show difference previous revision)
2. -See all the different file versions in a graph
3. -See a list of all file versions, compare between
them or return to a previous version
11. -In TSE to control which (changed) files you want to copy to your working directory
while working in TSE, you can e.g. run a TSE macro similar to the following.
E.g. each time you save (any) file.
Bind it e.g. to a key, like <CTRL s><0>)
(it optionally could (also) check if your file is changed
(but that would more usable when TSE itself handles the version control).
It offers to copy it to your working directory.
It always saves it further as usual
If you then once in a while when it suits you 'SVN commit' it via
Microsoft Explorer, then it will be added as next version to the
version control system)
12. -E.g. create the following program:
--- cut here: begin --------------------------------------------------
// filenamemacro=filesavc.s
--- cut here: end ----------------------------------------------------
--- cut here: begin --------------------------------------------------
// PROC PROCFileSaveCurrent()
--- cut here: end ----------------------------------------------------
--- cut here: begin --------------------------------------------------
FORWARD INTEGER PROC FNBufferGetBufferIdFileCurrentI()
FORWARD INTEGER PROC FNBufferGetBufferIdGivenBufferNameI( STRING s1 )
FORWARD INTEGER PROC FNErrorCheckEscapeB( STRING s1 )
FORWARD INTEGER PROC FNErrorCheckSB( STRING s1 )
FORWARD INTEGER PROC FNFileCheckEditCentralMessageB( STRING s1, INTEGER i1 )
FORWARD INTEGER PROC FNFileCheckEditMessageB( STRING s1 )
FORWARD INTEGER PROC FNFileCheckGotoEndB()
FORWARD INTEGER PROC FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( STRING s1, INTEGER i1 )
FORWARD INTEGER PROC FNKeyCheckPressEscapeB( STRING s1 )
FORWARD INTEGER PROC FNLineCheckGotoBeginB()
FORWARD INTEGER PROC FNLineCheckInsertAfterLineGotoBeginTextInsertB( STRING s1 )
FORWARD INTEGER PROC FNMacroCheckExecB( STRING s1 )
FORWARD INTEGER PROC FNMacroCheckLoadB( STRING s1 )
FORWARD INTEGER PROC FNMacroCheckPurgeB( STRING s1 )
FORWARD INTEGER PROC FNMathCheckGetLogicFalseB()
FORWARD INTEGER PROC FNMathCheckGetLogicTrueB()
FORWARD INTEGER PROC FNMathCheckLogicNotB( INTEGER i1 )
FORWARD INTEGER PROC FNMathCheckLogicOrB( INTEGER i1, INTEGER i2 )
FORWARD INTEGER PROC FNMathGetProgramLineNumberAbsoluteCurrentI()
FORWARD INTEGER PROC FNStringCheckEmptyB( STRING s1 )
FORWARD INTEGER PROC FNStringCheckEnvironmentFoundNotB( STRING s1 )
FORWARD INTEGER PROC FNStringCheckEqualB( STRING s1, STRING s2 )
FORWARD INTEGER PROC FNStringCheckEqualCharacterLastNB( STRING s1, STRING s2 )
FORWARD INTEGER PROC FNStringCheckEqualErrorOrEmptyB( STRING s1 )
FORWARD INTEGER PROC FNStringGetLengthI( STRING s1 )
FORWARD INTEGER PROC FNTextCheckInsertB( STRING s1 )
FORWARD INTEGER PROC FNTextCheckInsertCentralB( STRING s1, INTEGER i1 )
FORWARD PROC Main()
FORWARD PROC PROCError( STRING s1 )
FORWARD PROC PROCErrorFileNotFound( STRING s1 )
FORWARD PROC PROCFileGotoEnd()
FORWARD PROC PROCFileInsertEndPrepare()
FORWARD PROC PROCFileInsertTextEnd( STRING s1, STRING s2, INTEGER i1 )
FORWARD PROC PROCFileRun4NtAliasCommandListUser( STRING s1 )
FORWARD PROC PROCFileSaveCurrentVersionControlCygwin( STRING s1, STRING s2 )
FORWARD PROC PROCLineInsertAfter()
FORWARD PROC PROCLineInsertAfterLineGotoBeginTextInsert( STRING s1 )
FORWARD PROC PROCMacroExec( STRING s1 )
FORWARD PROC PROCMacroPurge( STRING s1 )
FORWARD PROC PROCMacroRunPurge( STRING s1 )
FORWARD PROC PROCMacroRunPurgeParameter( STRING s1, STRING s2 )
FORWARD PROC PROCMessage( STRING s1 )
FORWARD PROC PROCMessageCons3( STRING s1, STRING s2, STRING s3 )
FORWARD PROC PROCTextGotoLineBegin()
FORWARD PROC PROCTextInsert( STRING s1 )
FORWARD PROC PROCTextRemovePositionStackPop()
FORWARD PROC PROCTextSavePositionStackPush()
FORWARD PROC PROCWarn( STRING s1 )
FORWARD PROC PROCWarnCons3( STRING s1, STRING s2, STRING s3 )
FORWARD PROC PROCWarnCons4( STRING s1, STRING s2, STRING s3, STRING s4 )
FORWARD PROC PROCWarnCons5( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 )
FORWARD STRING PROC FNStringGetAsciiToCharacterS( INTEGER i1 )
FORWARD STRING PROC FNStringGetCarS( STRING s1 )
FORWARD STRING PROC FNStringGetCharacterEndBackSlashNotEqualInsertEndS( STRING s1 )
FORWARD STRING PROC FNStringGetCharacterInsertEndIfEqualNotS( STRING s1, STRING s2 )
FORWARD STRING PROC FNStringGetCharacterSymbolCentralS( INTEGER i1 )
FORWARD STRING PROC FNStringGetCharacterSymbolSlashBackwardS()
FORWARD STRING PROC FNStringGetCharacterSymbolSpaceS()
FORWARD STRING PROC FNStringGetConcatS( STRING s1, STRING s2 )
FORWARD STRING PROC FNStringGetConcatSeparatorS( STRING s1, STRING s2, STRING s3 )
FORWARD STRING PROC FNStringGetConcatTailS( STRING s1, STRING s2 )
FORWARD STRING PROC FNStringGetCons3S( STRING s1, STRING s2, STRING s3 )
FORWARD STRING PROC FNStringGetCons4S( STRING s1, STRING s2, STRING s3, STRING s4 )
FORWARD STRING PROC FNStringGetCons5S( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 )
FORWARD STRING PROC FNStringGetConsS( STRING s1, STRING s2 )
FORWARD STRING PROC FNStringGetDirectoryVersionControlRepositoryS()
FORWARD STRING PROC FNStringGetDirectoryVersionControlWorkingS()
FORWARD STRING PROC FNStringGetEmptyS()
FORWARD STRING PROC FNStringGetEnvironmentS( STRING s1 )
FORWARD STRING PROC FNStringGetErrorS()
FORWARD STRING PROC FNStringGetEscapeS()
FORWARD STRING PROC FNStringGetFileDirectorySubLastS( STRING s1, STRING s2 )
FORWARD STRING PROC FNStringGetFileGetFilenamePathDefaultS( STRING s1 )
FORWARD STRING PROC FNStringGetFileIniDefaultS( STRING s1 )
FORWARD STRING PROC FNStringGetFilenameCurrentS()
FORWARD STRING PROC FNStringGetFilenameEndBackSlashNotEqualInsertEndS( STRING s1 )
FORWARD STRING PROC FNStringGetFilenameGlobalErrorS()
FORWARD STRING PROC FNStringGetFilenameIniDefaultS()
FORWARD STRING PROC FNStringGetGlobalS( STRING s1 )
FORWARD STRING PROC FNStringGetInitializationGlobalS( STRING s1, STRING s2, STRING s3 )
FORWARD STRING PROC FNStringGetInitializeNewStringS()
FORWARD STRING PROC FNStringGetLineNumberCurrentS()
FORWARD STRING PROC FNStringGetMachineNameS()
FORWARD STRING PROC FNStringGetMathIntegerToStringS( INTEGER i1 )
FORWARD STRING PROC FNStringGetMidStringS( STRING s1, INTEGER i1, INTEGER i2 )
FORWARD STRING PROC FNStringGetPathFileAlias4Dos4NtFilenameS()
FORWARD STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashNotS()
FORWARD STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashS()
FORWARD STRING PROC FNStringGetPortS()
FORWARD STRING PROC FNStringGetProgram4ntFilenameS()
FORWARD STRING PROC FNStringGetRightStringLengthEqualS( STRING s1, STRING s2 )
FORWARD STRING PROC FNStringGetRightStringS( STRING s1, INTEGER i1 )
FORWARD STRING PROC FNStringGetSectionSeparatorS()
FORWARD STRING PROC FNStringGetUserNameFirstS()
FORWARD STRING PROC FNStringGetUserNameLastS()
FORWARD STRING PROC FNStringGet_FilenameIniDefaultS()
// --- MAIN --- //
PROC Main()
// STRING s[255]=GetTimeStr()
//
// STRING s1[255] = "C:\TEMP\C1"
STRING s1[255] = FNStringGetDirectoryVersionControlWorkingS()
//
// STRING s2[255] = "C:\TEMP\R1"
STRING s2[255] = FNStringGetDirectoryVersionControlRepositoryS()
// e.g //
PROCFileSaveCurrentVersionControlCygwin( s1, s2 )
//
// Warn( "File", " ", CurrFilename(), " ", "is now saved in your local working directory", " ", s1, " ", "and committed as a next revision to your repository", " ", s2 )
//
// Message( Format( CurrFilename(), " ", "saved in time", " ", s + "-" + GetTimeStr() ) )
//
END
<F12> Main()
// --- LIBRARY --- //
// library: string: get: directory: version: control: working <description></description> <version>1.0.0.0.1</version> <version control></version control> (filenamemacro=getstcwo.s) [<Program>] [<Research>] [kn, am, mo, 11-10-2010 10:18:56]
STRING PROC FNStringGetDirectoryVersionControlWorkingS()
// e.g. PROC Main()
// e.g. Message( FNStringGetDirectoryVersionControlWorkingS() ) // gives e.g. "P:\TEMP\MYWORKINGDIRECTORY\"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetDirectoryVersionControlWorkingS" ) )
//
END
// library: string: get: directory: version: control: repository <description></description> <version>1.0.0.0.2</version> <version control></version control> (filenamemacro=getstcrg.s) [<Program>] [<Research>] [kn, am, mo, 11-10-2010 10:18:56]
STRING PROC FNStringGetDirectoryVersionControlRepositoryS()
// e.g. PROC Main()
// e.g. Message( FNStringGetDirectoryVersionControlRepositoryS() ) // gives e.g. "P:\TEMP\MYREPOSITORYDIRECTORY\"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetDirectoryVersionControlRepositoryS" ) )
//
END
// library: file: save: current: version: control: cygwin <description></description> <version control></version control> <version>1.0.0.0.65</version> (filenamemacro=filesavc.s) [<Program>] [<Research>] [kn, zoe, mo, 20-11-2000 14:31:57]
PROC PROCFileSaveCurrentVersionControlCygwin( STRING fileVersionControlDirectoryWorkingS, STRING fileVersionControlDirectoryRepositoryS )
// e.g. PROC Main()
// e.g. // STRING s[255]=GetTimeStr()
// e.g. //
// e.g. // STRING s1[255] = "C:\TEMP\C1"
// e.g. STRING s1[255] = FNStringGetDirectoryVersionControlWorkingS()
// e.g. //
// e.g. // STRING s2[255] = "C:\TEMP\R1"
// e.g. STRING s2[255] = FNStringGetDirectoryVersionControlRepositoryS()
// e.g //
// e.g. PROCFileSaveCurrentVersionControlCygwin( s1, s2 )
// e.g. //
// e.g. // Warn( "File", " ", CurrFilename(), " ", "is now saved in your local working directory", " ", s1, " ", "and committed as a next revision to your repository", " ", s2 )
// e.g. //
// e.g. // Message( Format( CurrFilename(), " ", "saved in time", " ", s + "-" + GetTimeStr() ) )
// e.g. //
// e.g. END
// e.g.
// e.g. <F12> Main()
//
INTEGER fileExistB = FALSE
//
STRING fileNameS[255] = Format( AddTrailingSlash( fileVersionControlDirectoryWorkingS ), SplitPath( CurrFileName(), _NAME_ | _EXT_ ) )
//
STRING driveS[255] = SplitPath( fileVersionControlDirectoryWorkingS, _DRIVE_ )
//
STRING directoryS[255] = SplitPath( fileVersionControlDirectoryWorkingS, _PATH_ )
//
STRING s[255] = "commit"
//
IF ( NOT ( FileExists( Format( AddTrailingSlash( fileVersionControlDirectoryRepositoryS ), "*.*" ) ) ) )
//
CopyToWinclip( 'c: && cd \TEMP\ && svnadmin create R1 && md S1 && svn import S1 file
:////cygdrive/c/temp/R1 -m "This is a test"' )
//
Warn( "Repository not found. Please check the URL or create a new repository.", " ", "Copied to Microsoft Windows clipboard:", " ", 'c: && cd \TEMP\ && svnadmin create R1 && md S1 && svn import S1 file
:////cygdrive/c/temp/R1 -m "This is a test"' )
//
RETURN()
//
ENDIF
//
IF ( NOT ( FileExists( Format( AddTrailingSlash( fileVersionControlDirectoryWorkingS ), "*.*" ) ) ) )
//
CopyToWinclip( "c: && cd \TEMP\ && svn checkout file
:////cygdrive/c/temp/R1 C1" )
//
Warn( "Working directory not found. Please check or create a new working directory. Copied to Microsoft Windows clipboard: 'c: && cd \TEMP\ && svn checkout file
:////cygdrive/c/temp/R1 C1'" )
//
RETURN()
//
ENDIF
//
fileExistB = FileExists( fileNameS )
//
SaveAs( fileNameS, _OVERWRITE_ ) // saving the file in your Subversion 'working directory'
//
IF ( NOT ( fileExistB ) )
//
// PROCFileRun4NtAliasCommandListHideUser( Format( driveS, " ", "&&", " ", "cd", " ", directoryS, " ", "&&", " ", "svn add", " ", SplitPath( fileNameS, _NAME_ | _EXT_ ) ) )
PROCFileRun4NtAliasCommandListUser( Format( driveS, " ", "&&", " ", "cd", " ", directoryS, " ", "&&", " ", "svn add", " ", SplitPath( fileNameS, _NAME_ | _EXT_ ) ) )
//
s = Format( "add + ", s )
//
ENDIF
//
// PROCFileRun4NtAliasCommandListHideUser( Format( driveS, " ", "&&", " ", "cd", " ", directoryS, " ", "&&", " ", "cd ..", " ", "&&", " ", "svn commit", " ", FNStringGetFileDirectorySubLastS( directoryS, "\" ), " ", "-m", " ", '"This is a test"' ) )
PROCFileRun4NtAliasCommandListUser( Format( driveS, " ", "&&", " ", "cd", " ", directoryS, " ", "&&", " ", "cd ..", " ", "&&", " ", "svn commit", " ", FNStringGetFileDirectorySubLastS( directoryS, "\" ), " ", "-m", " ", '"This is a test"' ) )
//
Message( s )
//
END
// library: file: get: ini: default: central <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfiidf.s) [<Program>] [<Research>] [kn, ri, we, 31-12-2003 02:17:48]
STRING PROC FNStringGetFileIniDefaultS( STRING searchS )
// e.g. PROC Main()
// e.g. Message( FNStringGetFileIniDefaultS( "path4dos" ) ) // gives e.g. "c:\4dos"
// e.g. END
// e.g.
// e.g. <F12> Main()
// e.g.
//
// USAGE
//
// 1. -Choose a filename for your global variables initialization file
//
// 1. -E.g. default name is here
//
// dddpath.ini
//
// 2. -You can set this name in a function in this library, if you
//
// want to change the default name
//
// 3. -Save this file in the directory
//
// (path chosen to be given by Microsoft Windows environment variable APPDATA)
//
// C:\Documents and Settings\<your Microsoft Windows login name>\Application Data\
//
// 4. -The full path to your initialization file is thus e.g.
//
// C:\Documents and Settings\Administrator\Application Data\dddpath.ini
//
// 5. -To keep things as simple as possible, you need to put once
//
// in top of your file the word (which must start at the beginning
//
// of the line). Further no more '[' characters starting at the begin of any line.
//
// [default]
//
// 6. -This file contains 0 or more lines of the general format
//
// <variable name> = <variable value>
//
// 1. -E.g.
//
// [default]
//
// path4dos = c:\4dos
//
// tsevariable1 = test1
//
// tsevariable2 = test2
//
// tsevariable3 = test3
//
// ...
//
// 2. -Note: you should/could put spaces before and after the '=' sign
//
// (e.g. for backwards compatibility purposes)
//
// 7. -Using this library, you can then e.g. get the value of your global variable from this file
//
RETURN( FNStringGetFileGetFilenamePathDefaultS( searchS ) )
//
END
// library: file: run: 4: nt: alias: command: list: user <description></description> <version control></version control> <version>1.0.0.0.187</version> (filenamemacro=run4fira.s) [<Program>] [<Research>] [kn, ri, su, 01-03-2009 15:29:03]
PROC PROCFileRun4NtAliasCommandListUser( STRING s )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. INTEGER bufferI = 0
// e.g. INTEGER I = 0
// e.g. STRING fileNameS[255] = FNStringGetProgramAliasRunFilenameListS() // casealiasinputlist.txt
// e.g. PushPosition()
// e.g. bufferI = CreateTempBuffer()
// e.g. GotoBufferId( bufferI )
// e.g. InsertFile( fileNameS )
// e.g. // I = List( "alias command", 115 - 21 )
// e.g. I = List( "FILE: RUN: 4NT: ALIAS: COMMAND: LIST: USER", FNWindowGetScreenWidthI() )
// e.g. IF ( NOT ( I == 0 ) )
// e.g. s1 = SubStr( GetText( 1, 255 ), 1, 188 - 1 )
// e.g. s1 = Trim( s1 )
// e.g. // combobox (but switched off as this is quicker)
// e.g. // s1 = FNStringGetInputS( "file: run: 4nt: alias: s = ", s1 )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. s1 = FNStringGetTagAngularRemoveWhileS( s1, "Please replace it by information to apply" )
// e.g. PROCFileRun4NtAliasCommandListUser( s1 )
// e.g. ENDIF
// e.g. PopPosition()
// e.g. PushPosition()
// e.g. GotoBufferId( bufferI )
// e.g. AbandonFile( bufferI )
// e.g. PopPosition()
// e.g. END
// e.g.
// e.g. <F12> Main()
// e.g. <CTRL L> RepeatFind()
//
// PROCFileChangeEditProgramRunStringAdd( "run", "", Format( "(program: 4nt: alias: general:", " ", s, ")" ) )
//
// LDos( QuotePath( FNStringGetProgram4ntFilenameS() ), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit && exit" ), _DONT_PROMPT_ )
// LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit && exit" ), _DONT_PROMPT_ )
// LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit" ), _DONT_PROMPT_ )
// LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", "/L", " ", "&&", " ", "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit" ), _DONT_PROMPT_ )
LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit" ), _DONT_PROMPT_ )
//
// PROCListSaveHistoryUser( s ) // old [kn, ri, su, 10-06-2012 13:44:33]
//
PROCMacroRunPurgeParameter( "runprmcn", Format( FNStringGetMachineNameS(), ";", FNStringGetUserNameFirstS(), ";", FNStringGetUserNameLastS(), ";", FNStringGetPortS(), ";", "Run%3A+Alias%3A+" + s + "&submit01=Create" ) )
//
Message( Format( s, " ", ": file: run: 4nt/4dos: alias: command: list: user" ) )
//
END
// library: string: get: file: directory: sub: last <description></description> <version control></version control> <version>1.0.0.0.7</version> (filenamemacro=getstdla.s) [<Program>] [<Research>] [kn, ri, su, 14-02-2010 02:05:36]
STRING PROC FNStringGetFileDirectorySubLastS( STRING directoryS, STRING separatorS )
// e.g. PROC Main()
// e.g. Warn( FNStringGetFileDirectorySubLastS( "c:\temp\dddd\", "\" ) ) // gives e.g. "dddd"
// e.g. Warn( FNStringGetFileDirectorySubLastS( "z:\webmethods7\integrationserver\packages\Default\", "\" ) ) // gives e.g. "Default"
// e.g. Warn( FNStringGetFileDirectorySubLastS( "z:\webmethods7\integrationserver\packages\Default", "\" ) ) // gives e.g. "Default"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
STRING s[255] = directoryS
//
INTEGER I = 0
//
IF ( RightStr( s, 1 ) == separatorS )
//
s = LeftStr( s, Length( s ) - 1 )
//
ENDIF
//
I = StrFind( separatorS, s, "b" )
//
IF ( I > 0 )
//
s = RightStr( s, Length( s ) - I )
//
ENDIF
//
RETURN( s )
//
END
// library: file: get: filename: path: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfipde.s) [<Program>] [<Research>] [kn, ri, we, 31-12-2003 02:14:28]
STRING PROC FNStringGetFileGetFilenamePathDefaultS( STRING searchS )
// e.g. PROC Main()
// e.g. Message( FNStringGetFileGetFilenamePathDefaultS( "path4dos" ) ) // gives e.g. "c:\4dos"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// RETURN( FNStringGetFileGetFilenamePathS( searchS, FNStringGetFilenameIniDefaultS() ) ) // [kn, ri, mo, 22-05-2006 23:59:52]
//
RETURN( FNStringGetInitializationGlobalS( searchS, FNStringGetSectionSeparatorS(), FNStringGetFilenameIniDefaultS() ) )
//
END
// library: string: get: program4nt <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgps.s) [<Program>] [<Research>] [kn, am, we, 29-04-2009 18:53:22]
STRING PROC FNStringGetProgram4ntFilenameS()
// e.g. PROC Main()
// e.g. Message( FNStringGetProgram4ntFilenameS() ) // gives e.g. "f:\4dos\4nt.exe"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "ProgramName4DosS" ) )
//
END
// library: string: get: path: file: alias4: dos4: nt <description></description> <version control></version control> <version>1.0.0.0.5</version> (filenamemacro=getstdnx.s) [<Program>] [<Research>] [kn, am, we, 29-04-2009 18:54:58]
STRING PROC FNStringGetPathFileAlias4Dos4NtFilenameS()
// e.g. PROC Main()
// e.g. Warn( FNStringGetPathFileAlias4Dos4NtFilenameS() ) // gives e.g. "c:\4dos\alias.dok"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCMacroRunPurgeParameter( "runprmcn", Format( FNStringGetMachineNameS(), ";", FNStringGetUserNameFirstS(), ";", FNStringGetUserNameLastS(), ";", FNStringGetPortS(), ";", "TSE%3A+String%3A+Get%3A" + "FNStringGetPathFileAlias4Dos4NtS" + "&submit01=Create" ) )
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetPathFileAlias4Dos4NtS" ) )
//
END
// library: macro: run: purge: parameter <description>macro: run a macro, then purge it, pass parameter string</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=runmappa.s) [<Program>] [<Research>] [[kn, ri, sa, 17-02-2001 02:22:27]
PROC PROCMacroRunPurgeParameter( STRING macronameS, STRING commandlineparameterS )
// e.g. PROC Main()
// e.g. PROCMacroRunPurgeParameter( macronameS, commandlineparameterS )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCMacroRunPurge( FNStringGetConsS( macronameS, commandlineparameterS ) )
//
END
// library: string: get: machine: name <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstmnc.s) [<Program>] [<Research>] [kn, ri, we, 16-06-2010 22:41:10]
STRING PROC FNStringGetMachineNameS()
// e.g. PROC Main()
// e.g. Message( FNStringGetMachineNameS() ) // gives e.g. "mcnlken01"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetMachineNameS" ) )
//
END
// library: string: get: user: name: first <description></description> <version control></version control> <version>1.0.0.0.3</version> (filenamemacro=getstnfi.s) [<Program>] [<Research>] [kn, ri, we, 16-06-2010 22:40:16]
STRING PROC FNStringGetUserNameFirstS()
// e.g. PROC Main()
// e.g. Message( FNStringGetUserNameFirstS() ) // gives e.g. "knud"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetUserNameFirstS" ) )
//
END
// library: string: get: user: name: last <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstnla.s) [<Program>] [<Research>] [kn, ri, we, 16-06-2010 22:40:40]
STRING PROC FNStringGetUserNameLastS()
// e.g. PROC Main()
// e.g. Message( FNStringGetUserNameLastS() ) // gives e.g. "van eeden"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetUserNameLastS" ) )
//
END
// library: string: get: port: name <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstpnc.s) [<Program>] [<Research>] [kn, ri, sa, 24-07-2010 21:52:33]
STRING PROC FNStringGetPortS()
// e.g. PROC Main()
// e.g. Message( FNStringGetPortS() ) // gives e.g. "80"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFileIniDefaultS( "FNStringGetPortS" ) )
//
END
// library: string: get: initialization: global <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstigl.s) [<Program>] [<Research>] [kn, ri, mo, 22-05-2006 23:44:33]
STRING PROC FNStringGetInitializationGlobalS( STRING searchS, STRING sectionS, STRING fileNameS )
// e.g. PROC Main()
// e.g. Message( FNStringGetInitializationGlobalS( "path4dos", "default", FNStringGetFilenameIniDefaultS() ) ) // e.g. gives "c:\4dos"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( GetProfileStr( sectionS, searchS, FNStringGetEmptyS(), fileNameS ) )
//
END
// library: string: get: section: separator <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstssh.s) [<Program>] [<Research>] [kn, ri, mo, 22-05-2006 23:43:21]
STRING PROC FNStringGetSectionSeparatorS()
// e.g. PROC Main()
// e.g. Message( FNStringGetSectionSeparatorS() ) // gives e.g. "default"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( "default" ) // you can not put this in the initialization file, because this actually determines the default section of that file itself. Possibly pass it as a command line parameter
//
END
// library: filename: get: filename: ini: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfiide.s) [<Program>] [<Research>] [kn, ri, we, 31-12-2003 02:15:47]
STRING PROC FNStringGetFilenameIniDefaultS()
// e.g. PROC Main()
// e.g. Message( FNStringGetFilenameIniDefaultS() ) // gives e.g. "c:\documents and settings\administrator\application data\dddpath.ini"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// RETURN( "c:\dddpath.ini" )
//
RETURN( FNStringGetConcatS( FNStringGetPathUser_DataApplicationCurrentBackslashS(), FNStringGet_FilenameIniDefaultS() ) )
//
END
// library: macro: run: purge <description>macro: run a macro, then purge it (this text goes into the main macro file)</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=runmarpu.s) [<Program>] [<Research>] [[kn, zoe, tu, 27-10-1998 18:54:17]
PROC PROCMacroRunPurge( STRING macronameS )
// e.g. PROC Main()
// e.g. PROCMacroRunPurge( "mysubma1.mac myparameter11 myparameter12" )
// e.g. PROCMacroRunPurge( "mysubma2.mac myparameter21" )
// e.g. PROCMacroRunPurge( "mysubma3.mac myparameter31 myparameter32" )
// e.g. END
//
IF FNStringCheckEmptyB( macronameS )
//
PROCError( "macro should not be empty" )
//
RETURN()
//
ENDIF
//
IF FNMacroCheckLoadB( FNStringGetCarS( macronameS ) ) // necessary if you pass parameters in a string
//
PROCMacroExec( macronameS )
//
PROCMacroPurge( FNStringGetCarS( macronameS ) )
//
ENDIF
//
// PROCFileInsertStringEndFilenameDefault( macronameS ) // if you want to count the frequency a certain macro has been called
//
END
// library: string: get: cons: string: concatenation: concatenation 2 words to 1 word (separated by a space) <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstgcx.s) [<Program>] [<Research>] [kn, ri, we, 25-11-1998 20:15:03]
STRING PROC FNStringGetConsS( STRING s1, STRING s2 ) // version with test if string empty
// e.g. PROC Main()
// e.g. Message( FNStringGetConsS( "john", "doe" ) ) // gives "john doe"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetConcatSeparatorS( s1, s2, FNStringGetCharacterSymbolSpaceS() ) )
//
END
// library: string: get: empty (return an empty string) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgem.s) [<Program>] [<Research>] [kn, ri, sa, 20-05-2000 20:11:03]
STRING PROC FNStringGetEmptyS()
// e.g. PROC Main()
// e.g. Message( FNStringGetEmptyS() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( "" )
//
END
// library: string: get: concat <description>concatenation 2 words tot 1 word</description> <version>1.0.0.0.1</version> (filenamemacro=getstgch.s) [<Program>] [<Research>] [kn, zoe, th, 01-02-2001 19:32:49]
STRING PROC FNStringGetConcatS( STRING s1, STRING s2 ) // version with test if string empty
// e.g. PROC Main()
// e.g. Message( FNStringGetConcatS( "test1", "test2" ) ) // version with test if string empty ) // gives e.g. "test1test2"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetConcatSeparatorS( s1, s2, FNStringGetEmptyS() ) )
//
END
// library: string: get: path: user: data: application: current: backslash <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcbe.s) [<Program>] [<Research>] [kn, ri, sa, 21-02-2004 23:01:06]
STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashS()
// e.g. PROC Main()
// e.g. Message( FNStringGetPathUser_DataApplicationCurrentBackslashS() ) // gives e.g. "c:\documents and settings\administrator\application data\" (this is a hidden directory)
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetFilenameEndBackSlashNotEqualInsertEndS( FNStringGetPathUser_DataApplicationCurrentBackslashNotS() ) )
//
END
// library: string: get: filename: ini: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstide.s) [<Program>] [<Research>] [kn, ri, sa, 21-02-2004 22:54:12]
STRING PROC FNStringGet_FilenameIniDefaultS()
// e.g. PROC Main()
// e.g. Message( FNStringGet_FilenameIniDefaultS() ) // gives e.g. "dddpath.ini"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( "dddpath.ini" ) // you can not put this in the global initialization file, because this actually determines the name of that file itself. You could overrule this by passing the filename as a parameter on the command line. (if ( parameter is empty ) then ( defaultfilename = dddpath.ini ), else ( defaultfilename = <that command line parameter> ) )
//
END
// library: string: check: empty <description>string: empty: is given string empty?</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checstcz.s) [<Program>] [<Research>] [[kn, ri, sa, 20-05-2000 20:11:08]
INTEGER PROC FNStringCheckEmptyB( STRING s )
// e.g. PROC Main()
// e.g. Message( FNStringCheckEmptyB( s ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringCheckEqualB( s, FNStringGetEmptyS() ) )
//
END
// library: error <description>error: central routine</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=ererror.s) [<Program>] [<Research>] [[kn, ni, mo, 03-08-1998 13:08:12]
PROC PROCError( STRING s )
// e.g. INTEGER ErrorGB = FNMathCheckGetLogicFalseB()
// e.g. PROC Main()
// e.g. PROCError( "this is an error" )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCTextSavePositionStackPush()
//
// Alarm()
//
// PROCWarn( s )
//
// Message( s )
//
// Message( "Linenr ", FNMathGetProgramLineNumberAbsoluteCurrentI(), ": ", s )
//
PROCWarnCons4( "Error: Linenr", FNStringGetLineNumberCurrentS(), ":", s )
//
// only when seriously: PROCFileInsertTextEnd( "line " + STR( FNMathGetProgramLineNumberAbsoluteCurrentI() ) + ": " + s, FNStringGetFilenameGlobalErrorS(), FNMathCheckGetLogicTrueB() )
//
PROCFileInsertTextEnd( "line " + STR( FNMathGetProgramLineNumberAbsoluteCurrentI() ) + ": " + s, FNStringGetFilenameGlobalErrorS(), FNMathCheckGetLogicTrueB() )
//
// errorGB = FNMathCheckGetLogicTrueB()
//
PROCTextRemovePositionStackPop()
//
END
// library: macro: check: load <description>macro: load: (Loads a Macro File From Disk Into Memory) R LoadMacro(STRING macro_filename)*</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checmacl.s) [<Program>] [<Research>] [[kn, zoe, we, 16-06-1999 01:07:06]
INTEGER PROC FNMacroCheckLoadB( STRING macronameS )
// e.g. PROC Main()
// e.g. Message( FNMacroCheckLoadB( macronameS ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( LoadMacro( macronameS ) )
//
END
// library: string: get: word: token: get: first: FNStringGetCarS(): Get the first word of a string (words delimited by a space " " (=space delimited list)). <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgca.s) [<Program>] [<Research>] [kn, ni, su, 02-08-1998 15:54:17]
STRING PROC FNStringGetCarS( STRING s )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "string: get: word: token: get: first: s = ", "this is a test" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. Message( FNStringGetCarS( s1 ) ) // gives e.g. "this"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// variation: RETURN( FNStringGetTokenFirstS( s, " " ) )
//
RETURN( GetToken( s, " ", 1 ) ) // faster, but not central
//
END
// library: macro: exec <description>macro: (Executes the Requested Macro) O ExecMacro([<Program>] [<Research>] [STRING macroname])*</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=execmame.s) [[kn, zoe, we, 16-06-1999 01:06:54]
PROC PROCMacroExec( STRING macronameS )
// e.g. PROC Main()
// e.g. PROCMacroExec( "video" )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF FNMathCheckLogicNotB( FNMacroCheckExecB( macronameS ) )
//
PROCWarnCons3( "macro", macronameS, ": could not be executed" )
//
ENDIF
//
END
// library: macro: purge <description>macro: (Purges a Macro File From Memory) R PurgeMacro(STRING s)*</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=purgmamp.s) [<Program>] [<Research>] [[kn, zoe, fr, 13-10-2000 19:09:32]
PROC PROCMacroPurge( STRING macronameS )
// e.g. PROC Main()
// e.g. PROCMacroPurge( macronameS )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF FNMathCheckLogicNotB( FNMacroCheckPurgeB( macronameS ) )
//
PROCWarnCons3( "macro", macronameS, ": could not be found" )
//
ENDIF
//
END
// library: string: get: concat: separator: string: concatenation: concatenate 2 words to 1 word, separated by separator <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcsg.s) [<Program>] [<Research>] [kn, zoe, th, 01-07-1999 01:33:18]
STRING PROC FNStringGetConcatSeparatorS( STRING s1, STRING s2, STRING separatorS )
// e.g. PROC Main()
// e.g. Message( FNStringGetConcatSeparatorS( "test1", "test2", " " ) ) // gives e.g. "tes1 test2"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF FNStringCheckEmptyB( s1 ) RETURN( s2 ) ENDIF
//
IF FNStringCheckEmptyB( s2 ) RETURN( s1 ) ENDIF
//
RETURN( s1 + separatorS + s2 ) // leave this like this. Do not call a function, as this is a primitive function, you will get into a recursive loop, and get stack overflow
//
END
// library: string: get: character: symbol: " " <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstssp.s) [<Program>] [<Research>] [kn, zoe, we, 25-10-2000 01:33:39]
STRING PROC FNStringGetCharacterSymbolSpaceS()
// e.g. PROC Main()
// e.g. Message( FNStringGetCharacterSymbolSpaceS() ) // gives " "
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetCharacterSymbolCentralS( 32 ) )
//
END
// library: string: get: filename: end: back: slash: not: equal: insert: end <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstiep.s) [<Program>] [<Research>] [kn, ni, su, 17-08-2003 00:24:04]
STRING PROC FNStringGetFilenameEndBackSlashNotEqualInsertEndS( STRING s )
// e.g. PROC Main()
// e.g. Message( FNStringGetFilenameEndBackSlashNotEqualInsertEndS( 'c:\temp\ddd' ) ) // gives e.g. a string 'c:\temp\ddd\' (so with always a string with a backslash '\' at the end)
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetCharacterEndBackSlashNotEqualInsertEndS( s ) )
//
END
// library: string: get: path: user: data: application: current <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstacu.s) [<Program>] [<Research>] [kn, ri, sa, 21-02-2004 22:50:55]
STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashNotS()
// e.g. PROC Main()
// e.g. Message( FNStringGetPathUser_DataApplicationCurrentBackslashNotS() ) // gives e.g. "c:\documents and settings\administrator\application data" (this is a hidden directory)
// e.g. END
// e.g.
// e.g. <F12> Main()
//
STRING s[255] = FNStringGetEnvironmentS( "APPDATA" )
//
IF FNStringCheckEnvironmentFoundNotB( s )
//
PROCWarnCons3( "current user path to application data", s, ": not found" )
//
s = FNStringGetErrorS()
//
ENDIF
//
RETURN( s )
//
END
// library: string: check: equal <description>string: equal: are two given strings equal? (stored in 'checstcf.s')</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checstcy.s) [<Program>] [<Research>] [[kn, zoe, we, 04-10-2000 18:23:27]
INTEGER PROC FNStringCheckEqualB( STRING s1, STRING s2 )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. STRING s2[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "string: check: equal: first string = ", "a" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. s2 = FNStringGetInputS( "string: check: equal: second string = ", "a" )
// e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF
// e.g. Message( FNStringCheckEqualB( s1, s2 ) ) // gives e.g. TRUE when string1 is equal to string2
// e.g. GetKey()
// e.g. PROCMessage( FNStringCheckEqualB( "knud", "knud" ) ) // gives TRUE
// e.g. GetKey()
// e.g. PROCMessage( FNStringCheckEqualB( "knud", "van" ) ) // gives FALSE
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( s1 == s2 )
//
END
// library: text: save: position: stack: push <description>text: save: position: stack: push: store</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=savetesp.s) [<Program>] [<Research>] [[kn, zoe, fr, 04-06-1999 23:01:00]
PROC PROCTextSavePositionStackPush()
// e.g. PROC Main()
// e.g. PROCTextSavePositionStackPush()
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PushPosition() // returns nothing
//
// pushpopGT = pushpopGT + 1 // for checking purposes on the end of your routines. This must give 0 (as there as as many +1 as -1 in the OK case)
//
END
// library: warn: cons4 <description>error: warning: give a warning message via 4 strings</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=conswawe.s) [<Program>] [<Research>] [[kn, ri, su, 29-07-2001 18:28:22]
PROC PROCWarnCons4( STRING s1, STRING s2, STRING s3, STRING s4 )
// e.g. PROC Main()
// e.g. PROCWarnCons4( s1, s2, s3, s4 )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCWarn( FNStringGetCons4S( s1, s2, s3, s4 ) )
//
END
// library: string: get: line: number: current (return the current linenumber) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstncm.s) [<Program>] [<Research>] [kn, ni, mo, 02-08-1999 00:46:42]
STRING PROC FNStringGetLineNumberCurrentS()
// e.g. PROC Main()
// e.g. Message( FNStringGetLineNumberCurrentS() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetMathIntegerToStringS( FNMathGetProgramLineNumberAbsoluteCurrentI() ) )
//
END
// library: file: insert: text: end <description>file: line: text: insert: end: goto the end of the given file, insert some text (when newlineB is TRUE, start every inserted line on a new line)</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=insefite.s) [<Program>] [<Research>] [[kn, ni, mo, 03-08-1998 13:08:29]
PROC PROCFileInsertTextEnd( STRING s, STRING filenameS, INTEGER newlineB )
// e.g. PROC Main()
// e.g. PROCFileInsertTextEnd( "this is put on the end of the file", "myoutputfile", FNMathCheckGetLogicTrueB() )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCTextSavePositionStackPush()
//
IF FNMathCheckLogicNotB( FNFileCheckEditMessageB( filenameS ) )
//
PROCTextRemovePositionStackPop()
//
RETURN()
//
ENDIF
//
PROCFileGotoEnd()
//
IF ( newlineB )
//
PROCFileInsertEndPrepare()
//
ENDIF
//
PROCTextInsert( s )
//
PROCTextRemovePositionStackPop()
//
END
// library: math: get: program: line: number: absolute: current <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getfincu.s) [<Program>] [<Research>] [kn, ni, mo, 02-08-1999 00:46:42]
INTEGER PROC FNMathGetProgramLineNumberAbsoluteCurrentI()
// e.g. PROC Main()
// e.g. Message( FNMathGetProgramLineNumberAbsoluteCurrentI() ) // gives e.g. 332 if the cursor is on line 332 in the current file
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// |
// ...
// +--------------------------------------------------+|
// | ||
// | ||
// | ||
// | ||
// | |V
// |cursor is here on this line |--- <-- CurrLine()
// | |
// | |
// |[end of file]-------------------------------------|
// | |
// | |
// | |
// | |
// | |
// | |
// | |
// | |
// | |
// | |
// | |
// +--------------------------------------------------+
//
RETURN( CurrLine() )
//
END
// library: string: get: filename: global: error <description></description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=getstget.s) [<Program>] [<Research>] [kn, zoe, fr, 20-10-2000 23:34:48]
STRING PROC FNStringGetFilenameGlobalErrorS()
// e.g. PROC Main()
// e.g. Message( FNStringGetFilenameGlobalErrorS() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetGlobalS( "filenameerrorGS" ) )
//
END
// library: math: check: get: logic: true: wrapper <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalt.s) [<Program>] [<Research>] [kn, ri, su, 22-07-2001 15:43:12]
INTEGER PROC FNMathCheckGetLogicTrueB()
// e.g. PROC Main()
// e.g. Message( FNMathCheckGetLogicTrueB() ) // gives TRUE
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( TRUE )
//
END
// library: text: remove: position: stack: pop <description>text: remove: position: stack: pop: restore</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=remotesp.s) [<Program>] [<Research>] [[kn, zoe, fr, 04-06-1999 23:01:00]
PROC PROCTextRemovePositionStackPop()
// e.g. PROC Main()
// e.g. PROCTextRemovePositionStackPop()
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PopPosition() // returns nothing
//
// pushpopGT = pushpopGT - 1 // for checking purposes on the end of your routines. This must give 0 (as there as as many +1 as -1 in the OK case)
//
END
// library: math: check: logic: not <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=checmaln.s) [<Program>] [<Research>] [kn, ri, tu, 15-05-2001 16:54:21]
INTEGER PROC FNMathCheckLogicNotB( INTEGER B )
// e.g. PROC Main()
// e.g. STRING s[255] = FNStringGetInitializeNewStringS()
// e.g. s = FNStringGetInputS( "math: check: logic: not: number = ", "1" )
// e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF
// e.g. Message( FNMathCheckLogicNotB( FNStringGetToIntegerI( s ) ) )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( NOT B )
//
END
// library: macro: check: exec <description>macro: (Executes the Requested Macro) O ExecMacro([<Program>] [<Research>] [STRING macroname])*</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checmace.s) [[kn, zoe, we, 16-06-1999 01:06:54]
INTEGER PROC FNMacroCheckExecB( STRING macronameS )
// e.g. PROC Main()
// e.g. Message( FNMacroCheckExecB( macronameS ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( ExecMacro( macronameS ) )
//
END
// library: warn: cons3 <description>error: warning: give a warning message via 3 strings</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=conswawd.s) [<Program>] [<Research>] [[kn, ri, su, 29-07-2001 18:24:52]
PROC PROCWarnCons3( STRING s1, STRING s2, STRING s3 )
// e.g. PROC Main()
// e.g. PROCWarnCons3( s1, s2, s3 )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCWarn( FNStringGetCons3S( s1, s2, s3 ) )
//
END
// library: macro: check: purge <description>macro: purge</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checmacp.s) [<Program>] [<Research>] [[kn, zoe, fr, 13-10-2000 19:03:50]
INTEGER PROC FNMacroCheckPurgeB( STRING macronameS )
// e.g. PROC Main()
// e.g. Message( FNMacroCheckPurgeB( macronameS ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( PurgeMacro( macronameS ) )
//
END
// library: string: get: character: symbol: central <description>string: get: character: symbol: central</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=getstscm.s) [<Program>] [<Research>] [[kn, ri, sa, 07-07-2001 22:35:39]
STRING PROC FNStringGetCharacterSymbolCentralS( INTEGER I )
// e.g. PROC Main()
// e.g. Message( FNStringGetCharacterSymbolCentralS( I ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetAsciiToCharacterS( I ) )
//
END
// library: string: get: backslash: if last character is not equal to '\', then concatenate a backslash to the end of the given string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstien.s) [<Program>] [<Research>] [kn, ri, sa, 24-02-2001 23:48:15]
STRING PROC FNStringGetCharacterEndBackSlashNotEqualInsertEndS( STRING s )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "string: get: backslash: if: not equal insert end: string = ", "this is a string without a backslash at end" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. Message( FNStringGetCharacterEndBackSlashNotEqualInsertEndS( s1 ) ) // gives e.g. "this is a string with a backslash at end\"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetCharacterInsertEndIfEqualNotS( s, FNStringGetCharacterSymbolSlashBackwardS() ) )
//
END
// library: environment: string: get (Searches for and Returns a Specified Environment Str) R GetEnvStr(STRING s)* <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgen.s) [<Program>] [<Research>] [kn, ri, th, 25-10-2001 01:44:48]
STRING PROC FNStringGetEnvironmentS( STRING s )
// e.g. PROC Main()
// e.g. STRING s[255] = FNStringGetInputS( "value: environment variable = ", "windir" )
// e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF
// e.g. PROCMessageCons3( s, "=", FNStringGetEnvironmentS( s ) ) // gives e.g. "windir=C:\WINNT", when working on a Windows2000 machine
// e.g. END
// e.g.
// e.g. <F12> Main()
//
STRING valueS[255] = GetEnvStr( s )
//
IF FNStringCheckEmptyB( valueS )
//
PROCMessageCons3( "environment variable", s, ": not found" )
//
valueS = FNStringGetErrorS()
//
ENDIF
//
RETURN( valueS )
//
END
// library: environment: check: found: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checenfn.s) [<Program>] [<Research>] [kn, ri, sa, 27-05-2006 20:20:03]
INTEGER PROC FNStringCheckEnvironmentFoundNotB( STRING s )
// e.g. PROC Main()
// e.g. Message( FNStringCheckEnvironmentFoundNotB( FNStringGetEmptyS() ) ) // gives TRUE (thus not found) because string empty (or string error string)
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringCheckEqualErrorOrEmptyB( s ) )
//
END
// library: string: get: error <description>general output string to recognize an error (e.g. in another routine). Central routine, only one occurrence of this constant string</description> <version>1.0.0.0.1</version> <version control></version control> (filenamemacro=getstger.s) [<Program>] [<Research>] [kn, ri, sa, 05-12-1998 20:58:17]
STRING PROC FNStringGetErrorS()
// e.g. PROC Main()
// e.g. Message( FNStringGetErrorS() ) // gives e.g. "<ERROR>"
// e.g. END
//
RETURN( "<ERROR>" )
//
END
// library: warn <description>error: warning: give a warning message</description> <version>1.0.0.0.1</version> <version control></version control> (filenamemacro=wawarn.s) [<Program>] [<Research>] [kn, zoe, we, 09-06-1999 22:11:07]
PROC PROCWarn( STRING s )
// e.g. PROC Main()
// e.g. PROCWarn( "you have forgotten to input a value" )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
Warn( s )
//
END
// library: string: get: cons4: string: concatenation: 4 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcz.s) [<Program>] [<Research>] [kn, zoe, fr, 17-11-2000 13:54:56]
STRING PROC FNStringGetCons4S( STRING s1, STRING s2, STRING s3, STRING s4 )
// e.g. PROC Main()
// e.g. Message( FNStringGetCons4S( "a", "b", "c", "d" ) ) // gives e.g. "a b c d"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetConsS( FNStringGetCons3S( s1, s2, s3 ), s4 ) )
//
END
// library: string: get: math: get: integer: to: convert an integer to a string <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getsttsu.s) [<Program>] [<Research>] [number to string] [kn, ni, mo, 03-08-1998 00:34:05]
STRING PROC FNStringGetMathIntegerToStringS( INTEGER I )
// e.g. PROC Main()
// e.g. Message( FNStringGetMathIntegerToStringS( 3 ) ) // gives e.g. "3"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( Str( I ) )
//
END
// library: file: edit: edit a file, with test of problems <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checficf.s) [<Program>] [<Research>] [kn, ni, mo, 03-08-1998 13:08:39]
INTEGER PROC FNFileCheckEditMessageB( STRING filenameS )
// e.g. PROC Main()
// e.g. Message( FNFileCheckEditMessageB( "" ) ) // gives e.g. TRUE when file loaded without problems
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNFileCheckEditCentralMessageB( filenameS, FNMathCheckGetLogicTrueB() ) )
//
END
// library: file: movement: end: goto end of file: moves to the end of the last line of current file <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotofien.s) [<Program>] [<Research>] [kn, ri, su, 28-03-1999 01:08:06]
PROC PROCFileGotoEnd()
// e.g. PROC Main()
// e.g. PROCFileGotoEnd()
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF FNMathCheckLogicNotB( FNFileCheckGotoEndB() )
//
// PROCWarn( "cursor was already in end file else error: could no go to end of file" )
//
ENDIF
//
END
// library: file: insert: end: prepare <description>file: insert: prepare for the insertion (e.g. of text, of a new file, ...)</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=insefiep.s) [<Program>] [<Research>] [[kn, zoe, th, 25-01-2001 18:03:46]
PROC PROCFileInsertEndPrepare()
// e.g. PROC Main()
// e.g. PROCFileInsertEndPrepare()
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCFileGotoEnd()
//
PROCLineInsertAfter()
//
PROCTextGotoLineBegin()
//
END
// library: text: insert: insert text <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=insetein.s) [<Program>] [<Research>] [kn, ni, mo, 10-08-1998 06:26:51]
PROC PROCTextInsert( STRING s )
// e.g. PROC Main()
// e.g. STRING s[255] = FNStringGetInitializeNewStringS()
// e.g. s = FNStringGetInputS( "which text to insert at current position = ", FNStringGetEmptyS() )
// e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF
// e.g. PROCTextInsert( s )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF FNStringCheckEmptyB( s )
//
// PROCerror( FNStringGetFilenameCurrentS() + ": Attempt made to insert an empty string" )
//
RETURN()
//
ENDIF
//
IF FNMathCheckLogicNotB( FNTextCheckInsertB( s ) )
//
PROCerror( FNStringGetCons4S( FNStringGetFilenameCurrentS(), ": Text '", s, "' could not be inserted" ) )
//
ENDIF
//
END
// library: string: get: global <description>string: global: get: get a global string</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=getstggl.s) [<Program>] [<Research>] [[kn, zoe, mo, 14-06-1999 20:54:18]
STRING PROC FNStringGetGlobalS( STRING stringglobalnameS )
// e.g. PROC Main()
// e.g. PROCMessage( FNStringGetGlobalS( "dirGS" ) ) // e.g. gives "c:\"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetGlobalS( "dir1GS" ) ) // indicates first that this string does not exist, and returns the result '<VARIABLE NOT KNOWN>'.
// e.g. END
// e.g.
// e.g. <F12> Main()
//
//
STRING s[255] = FNStringGetInitializeNewStringS()
//
IF FNMathCheckLogicNotB( ExistGlobalVar( stringglobalnameS ) )
//
PROCWarnCons5( "file", FNStringGetFilenameCurrentS(), ":", stringglobalnameS, ": this string is not known to this macro (suggestion: execute 'initglobal.mac' (or 'i.m') for this macro)" )
//
RETURN( FNStringGetErrorS() )
//
ENDIF
//
s = GetGlobalStr( stringglobalnameS )
//
RETURN( s )
//
END
// library: string: get: cons3: string: concatenation: 3 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcy.s) [<Program>] [<Research>] [kn, zoe, fr, 17-11-2000 13:52:07]
STRING PROC FNStringGetCons3S( STRING s1, STRING s2, STRING s3 )
// e.g. PROC Main()
// e.g. Message( FNStringGetCons3S( "a", "b", "c" ) ) // gives e.g. "a b c"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetConsS( FNStringGetConsS( s1, s2 ), s3 ) )
//
END
// library: string: get: ascii: to: character (given the ASCII value, what is the corresponding character? (Get Single Character Equivalent of an Integer). Syntax: Chr(INTEGER i)*) <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getsttch.s) [<Program>] [<Research>] [kn, zoe, we, 16-06-1999 01:06:51]
STRING PROC FNStringGetAsciiToCharacterS( INTEGER asciiI )
// e.g. PROC Main()
// e.g. Warn( FNStringGetAsciiToCharacterS( 65 ) ) // gives "A"
// e.g. Warn( FNStringGetAsciiToCharacterS( 66 ) ) // gives "B"
// e.g. Warn( FNStringGetAsciiToCharacterS( 100 ) ) // gives "d"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( Chr( asciiI ) ) // leave this keyword, otherwise possibly recursive stack overflow
//
END
// library: compare if string end is equal, if not so insert that string at the end <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstenp.s) [<Program>] [<Research>] [kn, ri, sa, 24-02-2001 23:06:33]
STRING PROC FNStringGetCharacterInsertEndIfEqualNotS( STRING inS, STRING tailS )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. STRING s2[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "string: insert: insert: string = ", "c:\kee" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. s2 = FNStringGetInputS( "string: insert: insert: frontS = ", "\" )
// e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF
// e.g. Message( FNStringGetCharacterInsertEndIfEqualNotS( s1, s2 ) ) // gives e.g. "c:\kee\"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c", ":" ) ) // gives "c:"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c:", ":" ) ) // gives "c:"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c:\kee", FNStringGetCharacterSymbolSlashBackwardS() ) ) // gives "c:\kee\"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
STRING s[255] = inS
//
IF FNMathCheckLogicNotB( FNStringCheckEqualCharacterLastNB( s, tailS ) )
//
// s = FNStringGetConcatS( s, tailS )
//
s = FNStringGetConcatTailS( s, tailS )
//
ENDIF
//
RETURN( s )
//
END
// library: string: get: character: symbol: "\" <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstsba.s) [<Program>] [<Research>] [kn, ri, su, 29-07-2001 15:41:11]
STRING PROC FNStringGetCharacterSymbolSlashBackwardS()
// e.g. PROC Main()
// e.g. Message( FNStringGetCharacterSymbolSlashBackwardS() ) // gives "\"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetCharacterSymbolCentralS( 92 ) )
//
END
// library: message: cons3 <description></description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=consmemd.s) [<Program>] [<Research>] [kn, ri, su, 29-07-2001 18:24:52]
PROC PROCMessageCons3( STRING s1, STRING s2, STRING s3 )
// e.g. PROC Main()
// e.g. PROCMessageCons3( s1, s2, s3 )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCMessage( FNStringGetCons3S( s1, s2, s3 ) )
//
END
// library: environment: check: found: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checenfn.s) [<Program>] [<Research>] [kn, ri, sa, 27-05-2006 20:20:03]
INTEGER PROC FNStringCheckEqualErrorOrEmptyB( STRING s )
// e.g. PROC Main()
// e.g. Message( FNStringCheckEqualErrorOrEmptyB( FNStringGetEmptyS() ) ) // gives TRUE if string empty or string equals error string
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNMathCheckLogicOrB( FNErrorCheckSB( s ), FNStringCheckEmptyB( s ) ) )
//
END
// library: file: check: edit: message <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=central.s) [<Program>] [<Research>] [kn, ho, mo, 17-04-2006 17:41:21]
INTEGER PROC FNFileCheckEditCentralMessageB( STRING filenameS, INTEGER messageB )
// e.g. PROC Main()
// e.g. Message( FNFileCheckEditCentralMessageB( "test.dok", FNMathCheckGetLogicFalseB() ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
INTEGER editfileB = FNMathCheckGetLogicFalseB()
//
STRING s[255] = ""
//
if FNStringCheckEmptyB( filenameS )
//
editfileB = EditFile()
//
ELSE
//
editfileB = EditFile( filenameS )
//
ENDIF
//
IF FNMathCheckLogicNotB( editfileB )
//
IF messageB
//
PROCErrorFileNotFound( filenameS )
//
ENDIF
//
ENDIF
//
s = CurrFileName()
//
PROCMacroRunPurgeParameter( "runprmcn", Format( FNStringGetMachineNameS(), ";", FNStringGetUserNameFirstS(), ";", FNStringGetUserNameLastS(), ";", FNStringGetPortS(), ";", "TSE%3A+File%3A+Load%3A+" + s + "&submit01=Create" ) )
//
RETURN( editfileB )
//
END
// library: file: check: goto: end <description>file: movement: end: goto end of file: moves to the end of the last line of current file</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checfigs.s) [<Program>] [<Research>] [[kn, ri, su, 28-03-1999 01:08:06]
INTEGER PROC FNFileCheckGotoEndB()
// e.g. PROC Main()
// e.g. PROCMessage( FNFileCheckGotoEndB() )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( EndFile() )
//
END
// library: line: insert: inserts 1 line after current line. The cursor is placed on the newly created line. The cursor column does not change <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=inseliaf.s) [<Program>] [<Research>] [kn, ni, mo, 03-08-1998 13:35:30]
PROC PROCLineInsertAfter()
// e.g. PROC Main()
// e.g. PROCLineInsertAfter()
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCLineInsertAfterLineGotoBeginTextInsert( FNStringGetEmptyS() )
//
END
// library: text: goto: line: begin // goto begin of line (=column 1 of the current line). If the cursor is already at the beginning of the current line, zero is returned. See also: EndLine() <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotolibe.s) [<Program>] [<Research>] [kn, zoe, th, 17-06-1999 00:12:52]
PROC PROCTextGotoLineBegin()
// e.g. PROC Main()
// e.g. PROCTextGotoLineBegin()
// e.g. END
//
// e.g. <F12> Main()
//
IF FNMathCheckLogicNotB( FNLineCheckGotoBeginB() )
//
// PROCWarn( "Could not go to the beginning of the current line" )
//
ENDIF
//
END
// library: text: check: insert <description>text: insert: insert text</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checteci.s) [<Program>] [<Research>] [[kn, zoe, tu, 23-11-1999 20:30:45]
INTEGER PROC FNTextCheckInsertB( STRING s )
// e.g. PROC Main()
// e.g. Message( FNTextCheckInsertB( s ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNTextCheckInsertCentralB( s, _INSERT_ ) )
//
END
// library: file: filename: get: current: return current filename (as a string containing the complete path) (Get Full Name of Current Buffer) (nofilenamemacro) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstfcv.s) [<Program>] [<Research>] [kn, ni, sa, 08-08-1998 00:02:37] [FNfilenamecurrent]
STRING PROC FNStringGetFilenameCurrentS()
// e.g. PROC Main()
// e.g. Message( FNStringGetFilenameCurrentS() ) // gives e.g. "c:\wordproc\tse\ddd.ddd"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( CurrFilename() )
//
END
// library: string: get: initialize: new: string <description>string: initialize</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=getstnsa.s) [<Program>] [<Research>] [[kn, ri, mo, 09-07-2001 12:00:07]
STRING PROC FNStringGetInitializeNewStringS()
// e.g. PROC Main()
// e.g. Message( FNStringGetInitializeNewStringS() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetEmptyS() )
//
END
// library: warn: cons5 <description>error: warning: give a warning message via 5 strings</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=conswawf.s) [<Program>] [<Research>] [[kn, ri, su, 29-07-2001 18:57:23]
PROC PROCWarnCons5( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 )
// e.g. PROC Main()
// e.g. PROCWarnCons5( s1, s2, s3, s4, s5 )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
PROCWarn( FNStringGetCons5S( s1, s2, s3, s4, s5 ) )
//
END
// library: string: word: equal: last: compare if a given string is equal at the end to another given string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checstln.s) [<Program>] [<Research>] [kn, zoe, we, 29-11-2000 19:08:34]
INTEGER PROC FNStringCheckEqualCharacterLastNB( STRING s, STRING tailS ) // version: first parameter s then endS
// e.g. PROC Main()
// e.g. Message( FNStringCheckEqualCharacterLastNB( "knud", "d" ) ) // gives TRUE
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringCheckEqualB( FNStringGetRightStringLengthEqualS( s, tailS ), tailS ) )
//
END
// library: string: get: concat: tail: suffix <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstctb.s) [<Program>] [<Research>] [kn, ri, su, 02-09-2001 03:08:08]
STRING PROC FNStringGetConcatTailS( STRING s, STRING tailS )
// e.g. PROC Main()
// e.g. Message( FNStringGetConcatTailS( "Knu", "d" ) ) // gives e.g. "Knud"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetConcatS( s, tailS ) )
//
END
// library: message <description></description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=memessag.s) [<Program>] [<Research>] [kn, zoe, we, 16-06-1999 01:07:07]
PROC PROCMessage( STRING s )
// e.g. PROC Main()
// e.g. PROCMessage( s )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
Message( s )
//
END
// library: math: check: logic: or: 2 arguments <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalo.s) [<Program>] [<Research>] [kn, ri, tu, 15-05-2001 16:54:17]
INTEGER PROC FNMathCheckLogicOrB( INTEGER B1, INTEGER B2 )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. STRING s2[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "math: check: logic: or: number1 = ", "1" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. s2 = FNStringGetInputS( "math: check: logic: or: number2 = ", "1" )
// e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF
// e.g. Message( FNMathCheckLogicOrB( FNStringGetToIntegerI( s1 ), FNStringGetToIntegerI( s2 ) ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF ( B1 )
//
RETURN( FNMathCheckGetLogicTrueB() )
//
ENDIF
//
IF ( B2 )
//
RETURN( FNMathCheckGetLogicTrueB() )
//
ENDIF
//
RETURN( FNMathCheckGetLogicFalseB() )
//
END
// library: error: check <description>error: test if an error occurred, via testing the output // version with testing local variable. Better.</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checercs.s) [<Program>] [<Research>] [[kn, ni, we, 05-08-1998 20:27:34]
INTEGER PROC FNErrorCheckSB( STRING s )
// e.g. PROC Main()
// e.g. PROCMessage( FNErrorCheckSB( "this is an error" ) // version with testing local variable. Better. ) // gives ...
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringCheckEqualB( s, FNStringGetErrorS() ) )
//
END
// library: math: check: get: logic: false: wrapper <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalf.s) [<Program>] [<Research>] [kn, ri, su, 22-07-2001 15:43:08]
INTEGER PROC FNMathCheckGetLogicFalseB()
// e.g. PROC Main()
// e.g. Message( FNMathCheckGetLogicFalseB() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FALSE )
//
END
// library: error: file: not: found <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=fileernf.s) [<Program>] [<Research>] [kn, ri, we, 28-02-2001 23:02:12]
PROC PROCErrorFileNotFound( STRING filenameS )
// e.g. PROC Main()
// e.g. PROCErrorFileNotFound( "xsefadafadfasdf.sdfa" )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
STRING s[255] = FNStringGetInitializeNewStringS()
//
IF FNErrorCheckEscapeB( filenameS )
//
s = FNStringGetConsS( FNStringGetEscapeS(), "has been pressed" )
//
ELSE
//
s = FNStringGetCons3S( "file: ", filenameS, "not found / path does not exist" )
//
ENDIF
//
PROCError( s )
//
END
// library: line: insert: after: line: goto: begin: text: insert <description>line insert after: insert text at first column (text: insert: after each other)</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=inselitj.s) [<Program>] [<Research>] [[kn, zoe, we, 28-02-2001 20:24:53]
PROC PROCLineInsertAfterLineGotoBeginTextInsert( STRING s )
// e.g. PROC Main()
// e.g. PROCLineInsertAfterLineGotoBeginTextInsert( s )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// variation: PROCLineInsertAfter() PROCLineGotoBeginTextInsert( s )
//
IF FNMathCheckLogicNotB( FNLineCheckInsertAfterLineGotoBeginTextInsertB( s ) )
//
// PROCWarn( "line could not be inserted" )
//
ENDIF
//
END
// library: line: check: goto: begin <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checligb.s) [<Program>] [<Research>] [kn, ni, mo, 03-08-1998 13:36:31]
INTEGER PROC FNLineCheckGotoBeginB() // version not central
// e.g. PROC Main()
// e.g. Message( "Goto the beginning of the line = ", FNLineCheckGotoBeginB() )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( BegLine() )
//
END
// library: text: check: insert: central <description>text: insert: insert text: central</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checteic.s) [<Program>] [<Research>] [[kn, ri, fr, 16-02-2001 22:00:44]
INTEGER PROC FNTextCheckInsertCentralB( STRING s, INTEGER optionB )
// e.g. PROC Main()
// e.g. Message( FNTextCheckInsertCentralB( s, optionB ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( InsertText( s, optionB ) )
//
END
// library: string: get: cons5: string: concatenation: 5 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcb.s) [<Program>] [<Research>] [kn, zoe, fr, 17-11-2000 13:55:03]
STRING PROC FNStringGetCons5S( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 )
// e.g. PROC Main()
// e.g. Message( FNStringGetCons5S( "a", "b", "c", "d", "e" ) ) // gives e.g. "a b c d e"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetConsS( FNStringGetCons4S( s1, s2, s3, s4 ), s5 ) )
//
END
// library: STRING: get: right: string: length: equal <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstler.s) [<Program>] [<Research>] [kn, ni, su, 30-11-2003 23:32:40]
STRING PROC FNStringGetRightStringLengthEqualS( STRING s, STRING tailS )
// e.g. PROC Main()
// e.g. Message( FNStringGetRightStringLengthEqualS( "Knud van Eeden", "12345" ) ) // gives e.g. "Eeden"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringGetRightStringS( s, FNStringGetLengthI( tailS ) ) )
//
END
// library: error: check: escape <description>escape or error</description> <version>1.0.0.0.0</version> <version control></version control> (filenamemacro=checerce.s) [<Program>] [<Research>] [[kn, zoe, th, 09-11-2000 23:18:32]
INTEGER PROC FNErrorCheckEscapeB( STRING s )
// e.g. PROC Main()
// e.g. Message( FNErrorCheckEscapeB( s ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
IF FNErrorCheckSB( s ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF
//
IF FNKeyCheckPressEscapeB( s ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF
//
RETURN( FNMathCheckGetLogicFalseB() )
//
END
// library: string: get: escape <description>general output string to recognize an escape (e.g. in another routine). Central routine, only one occurrence of this constant string</description> <version>1.0.0.0.2</version> (filenamemacro=getstges.s) [<Program>] [<Research>] [kn, ri, sa, 05-12-1998 18:52:24]
STRING PROC FNStringGetEscapeS()
// e.g. PROC Main()
// e.g. Message( FNStringGetEscapeS() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( "<ESCAPE>" )
//
END
// library: line insert after: insert text at first column <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=inseliti.s) [<Program>] [<Research>] [kn, zoe, we, 28-02-2001 20:24:53]
INTEGER PROC FNLineCheckInsertAfterLineGotoBeginTextInsertB( STRING s )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "line insert after: insert text at first column: s = ", "test" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. Message( FNLineCheckInsertAfterLineGotoBeginTextInsertB( s1 ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// RETURN( AddLine( s ) )
//
RETURN( FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( s, FNBufferGetBufferIdFileCurrentI() ) )
//
END
// library: string: get: word: token: last: return a given integer amount of characters from the right of a given string (=RIGHT$ in BASIC) <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=stririrs.s) [<Program>] [<Research>] [kn, ri, tu, 13-10-1998 20:05:49]
STRING PROC FNStringGetRightStringS( STRING s, INTEGER totalI )
// e.g. PROC Main()
// e.g. STRING s[255] = FNStringGetInitializeNewStringS()
// e.g. STRING charactertotalS[255] = FNStringGetInitializeNewStringS()
// e.g. s = FNStringGetInputS( "string: word: token: get: right: string = ", "knud" )
// e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF
// e.g. charactertotalS = FNStringGetInputS( "string: word: token: get: right: character total = ", "2" )
// e.g. IF FNKeyCheckPressEscapeB( charactertotalS ) RETURN() ENDIF
// e.g. Message( FNStringGetRightStringS( s, FNStringGetToIntegerI( charactertotalS ) ) ) // gives e.g. "kn"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetRightStringS( "knud", 1 ) ) // gives "d"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetRightStringS( "knud", 2 ) ) // gives "ud"
// e.g. GetKey()
// e.g. PROCMessage( FNStringGetRightStringS( "best", 3 ) ) // gives "est"
// e.g. END
// e.g.
// e.g. <F12> Main()
//
INTEGER lengthI = FNStringGetLengthI( s )
//
IF FNMathCheckLogicNotB( ( ( 0 <= totalI ) AND ( totalI <= lengthI ) ) ) // if not between 0 and length( string ), return the whole given string
//
totalI = lengthI
//
ENDIF
//
RETURN( FNStringGetMidStringS( s, 1 + lengthI - totalI, lengthI ) )
//
END
// library: string: line: length: what is the length <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgle.s) [<Program>] [<Research>] [kn, ri, we, 25-11-1998 20:20:58]
INTEGER PROC FNStringGetLengthI( STRING s )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "string: line: length: string = ", "this is a test" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. Message( FNStringGetLengthI( s1 ) ) // gives e.g. 14
// e.g. GetKey()
// e.g. Message( FNStringGetLengthI( "knud" ) ) // gives 4
// e.g. GetKey()
// e.g. Message( FNStringGetLengthI( "the" ) ) // gives 3
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( Length( s ) )
//
END
// library: key: check: press: escape <description>input: escape: test if escape was pressed</description> <version>1.0.0.0.2</version> (filenamemacro=checkepe.s) [<Program>] [<Research>] [kn, ni, we, 05-08-1998 20:29:00]
INTEGER PROC FNKeyCheckPressEscapeB( STRING s ) // version with testing local variable
// e.g. PROC Main()
// e.g. Message( FNKeyCheckPressEscapeB( "" ) ) // version with testing local variable ) // gives e.g. FALSE
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNStringCheckEqualB( s, FNStringGetEscapeS() ) )
//
END
// library: file: check: insert: line: after: line: goto: begin: text: insert: line insert after: insert text at first column (Add Line After Current Line). Syntax: AddLine( <STRING text <, INTEGER bufferid > > ). If the optional bufferid is specified, the line is added after the current line in the specified buffer. _ON_CHANGING_FILES_ hooks are not invoked by this command <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checfiti.s) [<Program>] [<Research>] [kn, zoe, we, 28-02-2001 20:24:53]
INTEGER PROC FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( STRING s, INTEGER bufferid )
// e.g. PROC Main()
// e.g. STRING s1[255] = FNStringGetInitializeNewStringS()
// e.g. STRING s2[255] = FNStringGetInitializeNewStringS()
// e.g. s1 = FNStringGetInputS( "line insert after: insert text at first column: s = ", "test" )
// e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF
// e.g. s2 = FNStringGetInputS( "line insert after: insert text at first column: bufferID = ", FNStringGetMathIntegerToStringS( FNBufferGetBufferIdFileCurrentI() ) )
// e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF
// e.g. Message( FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( s1, FNStringGetToIntegerI( s2 ) ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( AddLine( s, bufferid ) ) // s is the string that will be inserted at column 1 of the newly created line. BufferidI is the optional id of the file where the line is to be added. If not passed, the line is added to the current file.
//
END
// library: buffer: get: id: current ((Returns the Unique Id of Requested or Current Buffer) O GetBufferId([<Program>] [<Research>] [STRING name])*) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getbuicu.s) [kn, zoe, th, 25-01-2001 11:12:56]
INTEGER PROC FNBufferGetBufferIdFileCurrentI()
// e.g. PROC Main()
// e.g. Message( FNBufferGetBufferIdFileCurrentI() ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( FNBufferGetBufferIdGivenBufferNameI( FNStringGetFilenameCurrentS() ) )
//
END
// library: string: get: mid: string <description></description> <version control>string: get: word: token: middle: return a given integer amount of characters from the a given startposition</version control> <version>1.0.0.0.4</version> (=MID$ in BASIC) <version>1.0.0.0.4</version> (filenamemacro=getstmid.s) [<Program>] [<Research>] [kn, ri, tu, 13-10-1998 20:29:00]
STRING PROC FNStringGetMidStringS( STRING s, INTEGER beginI, INTEGER totalI )
// e.g. PROC Main()
// e.g. STRING s[255] = FNStringGetInitializeNewStringS()
// e.g. STRING positionbeginS[255] = FNStringGetInitializeNewStringS()
// e.g. STRING charactertotalS[255] = FNStringGetInitializeNewStringS()
// e.g. s = FNStringGetInputS( "string: get: MIDSTRING: string = ", "testing" )
// e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF
// e.g. positionbeginS = FNStringGetInputS( "string: get: MIDSTRING: beginposition = ", "2" )
// e.g. IF FNKeyCheckPressEscapeB( positionbeginS ) RETURN() ENDIF
// e.g. charactertotalS = FNStringGetInputS( "string: get: MIDSTRING: character total = ", "3" )
// e.g. IF FNKeyCheckPressEscapeB( charactertotalS ) RETURN() ENDIF
// e.g. Message( FNStringGetMidStringS( s, FNStringGetToIntegerI( positionbeginS ), FNStringGetToIntegerI( charactertotalS ) ) )
// e.g. END
// e.g.
// e.g. <F12> Main()
//
// Message( FNStringGetMidStringS( "knud", 2, 3 ) ) // gives "nud"
//
// Message( FNStringGetMidStringS( "knud", 3, 2 ) ) // gives "ud"
//
RETURN( SubStr( s, beginI, totalI ) )
//
END
// library: buffer: get: buffer: id: given: buffer: name (Returns the Unique Id of Requested or Current Buffer) O GetBufferId([<Program>] [<Research>] [STRING name])* <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getbubna.s) [kn, zoe, th, 25-01-2001 11:12:23]
INTEGER PROC FNBufferGetBufferIdGivenBufferNameI( STRING bufferNameS )
// e.g. PROC Main()
// e.g. Message( FNBufferGetBufferIdGivenBufferNameI( "test" ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
//
RETURN( GetBufferId( bufferNameS ) )
//
END
--- cut here: end ----------------------------------------------------
13. -Then run it each time you want to save a file in TSE
and also add it to your working directory.
14. -Do the commit once in a while in TortoiseSVN,
that will administer it as the next revision.
(you will have to do that actively, it is not done automatically).
Note:
The commit of that file will only change the version
number of that particular file (and thus not influence
the version numbers of other or all files)
15. -If you choose your backup directory
as your working directory, then you catch two birds
with one stone (and backup and version control).
16. -Tested successfully on
Microsoft Windows 7 Ultimate (64 bits),
running
Tortoise 1.6.11 64 bits
TSE v4.40.66
===
Book: see also:
===
Diagram: see also:
===
File: see also:
===
File: version: control: see also:
===
Help: see also:
===
Image: see also:
===
Internet: see also:
---
File: Version: Control: System: Program: Subversion: Links: Can you give an overview of links? [GraphLib / VCS]
http://goo.gl/i1v4U
===
Podcast: see also:
===
Screencast: see also:
===
Table: see also:
===
Video: see also:
===
<version>1.0.0.0.49</version>
----------------------------------------------------------------------