THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700


S U M M A R Y


DIARY: March 6, 1999 07:30 PM Saturday; Rod Welch

SDS automatically recognize default anchor without entering 0000.

1...Summary/Objective
2...000006 -Entry 982; Read character or blank as 0
3...000006 -Entry 985; Create Default Anchor as Blank
4...01211 Enter Blank for Default Anchor
5...000008 Entry 142 Let Save Work without Link Anchor
6...070405 Convert Citations in SDS Records into HTML
7...004 Create New SDS record in Schedule


..............
Click here to comment!

CONTACTS 

SUBJECTS
Position Opened Rcd with Anchor Near TOS
Default Anchor Blank = "0000"
Save, Primary, F2, macro 142, 0702051
Convert SDS Record to HTML for Local
References

0807 -    ..
0808 - Summary/Objective
0809 -
080901 - Follow up ref SDS 9 0000, ref SDS 6 0000
080902 -
080903 - Changed the program so we don't have to enter the default anchor 0000.
080904 -
080905 - This makes writing up the record a little easier and it looks a little
080906 - cleaner.  It also enables the program to handle records that do not
080907 - have any anchors.  Previously when these are encountered it took a lot
080908 - of time to stop and enter the anchors.
080909 -
080910 -
080911 -
080912 -
0810 -
0811 -
0812 - Planning
0813 -
081301 - The anchor system uses "0000" as the default anchor, and so today, I
081302 - want to eliminate the need to enter the anchor string 0000 in order
081303 - for the system to apply it.
081304 -
081305 - Entering 0000 is redundant because it always goes to the same place in
081306 - the recorf. Extra work is needed to make the entry manually, and it is
081307 - confusing in the record.
081308 -
081309 - Things that need to be coordinated...
081310 -
081311 -         read anchors                           000006, -entry 982
081312 -         create anchors                         000006, -entry 985
081313 -         save SDS record                        000008, -entry 142
081314 -         convert SDS to HTML                    0704050
081315 -         create New SDS record and links        0040, ref SDS 0 7938
081316 -
081317 -
081318 -
0814 -
0815 -
0816 - Progress
0817 -
081701 -  ..
081702 - 000006 -Entry 982; Read character or blank as 0
081703 -
081704 - Follow up ref SDS 6 2728.
081705 -
081706 - Want to let this code recognize when an anchor is not specified and
081707 - use zero in that case.
081708 -
081709 - Line 1460, ref OF 4 7666, -label gNumA, this is where the anchor is
081710 - evaluated.
081711 -
081712 - Added code so if we do not encounter a number, then we set the anchor
081713 - to 0.  If the reference link is at the end of the line, and the code
081714 - jumps to the next line looking for the anchor, then if the next line
081715 - is blank, the cursor lands on column 1, and if that occurs, it means
081716 - there is no anchor, so we do the code that sets the anchor to 0.  If
081717 - the character is not a number, then again set the anchor to 0 unless
081718 - the chr is an "l" which could be a "line" spec, and in that case, we
081719 - check the next position to see if there is an "i" and if so we process
081720 - a line spec, and if not, the anchor is 0.
081721 - ..
081722 - Line 1500, ref OF 4 4730, -entry 105, this converts the 2 char
081723 - reference number to an absolute line number for finding the entry in
081724 - the Reference field.  I changed this a bit tonight so if the second
081725 - position is not a number, it must be punctuation or a blank, and so
081726 - only the first position needs to be processed.
081727 -
081728 -
081729 -
081730 -  ..
081731 - 000006 -Entry 985; Create Default Anchor as Blank
081732 -
081733 - Follow up ref SDS 6 2728.
081734 -
081735 - Line 1800, ref OF 4 7378, -label neAnc, about 30 lines below, is
081736 - where the default condition is evaluated.
081737 -
081738 - If we are on the Summary line, we do not want to enter anything.
081739 -
081740 - The code here does setgbl 167 0 and
081741 -
081742 - Line 2040, ref OF 4 4088, -label arcvR2, processing is completed by
081743 - macro 01211.
081744 -
081745 -
081746 -  ..
081747 - 01211  Enter Blank for Default Anchor
081748 -
081749 - Line 280, ref OF 2 5950, -label cuR3, this is where 167 is evaluated.
081750 -
081751 - Changed code to avoid making an entry is 167 = 0.
081752 -
081753 -
081754 -
081755 -  ..
081756 - 000008 Entry 142 Let Save Work without Link Anchor
081757 -
081758 - Follow up ref SDS 10 8488.
081759 -
081760 - Line 2580, ref OF 5 5537, -label lpm3, testing debug here to find out
081761 - why this thing cares whether there is an anchor.
081762 -
081763 -      Problem seems to be above this.
081764 -
081765 - Line 2370, ref OF 5 2988, -entry 145, will test debug here.
081766 -
081767 - Line 2590, ref OF 5 5537, -label LpM1, this is where the code looks
081768 - for references and so this is where the problem should be.
081769 -
081770 - Why does it pass an entry without an anchor for an SDS record but hang
081771 - up on an entry for a document that has no anchor?
081772 -
081773 -      The reason seems to be that SDS processing uses macro 105, which
081774 -      I just fixed, per above, ref SDS 0 1449, and processing other
081775 -      stuff does not use macro 105, it has a slightly different
081776 -      approach for some reason...
081777 -
081778 - Line 2930, ref OF 5 4072, -label lpnfnd, this is the code that has
081779 - the problem.  It is the alternate approach for non-SDS references.
081780 -
081781 - I added 2 lines of code so if the second reference param is not a
081782 - number, then the code for using only the first param will be used.
081783 -
081784 -
081785 -  ..
081786 - 070405  Convert Citations in SDS Records into HTML
081787 -
081788 - Follow up ref SDS 7 1623.
081789 -
081790 - Line 1560, ref OF 3 4131, -label gNumb,
081791 -
081792 - Line 1600, ref OF 3 2990, -label ref2, this seems to be a comparable
081793 - place in the code to entry 982 in 000006 changed above. ref SDS 0 7388
081794 -
081795 - Testing with debug 100 here.
081796 -
081797 - Line 1610, ref OF 3 1651, -label ref2, the code recognizes it landed
081798 - on column 1 in the next line below, because it was at the end of the
081799 - line above.  It means there is no additional link spec on the next
081800 - line, so the code cycles back to look for another ref on the same
081801 - line.  This needs to be changed, so the code enters a default anchor
081802 - 0000.
081803 -
081804 - I disconnected the following code...
081805 -
081806 -                   -if @19 < 7 -got ref2
081807 -
081808 -     ....and replaced with code that sets the anchor to 0, and marches
081809 -     on.
081810 -
081811 - Line 1630, ref OF 3 4860, this has to do the same thing.
081812 -
081813 - Line 1650, ref OF 3 5581, -label gNumbc this is a little bit of new
081814 - stuff that establishes no anchor was encountered and so sets it to 0.
081815 -
081816 - Later I removed the code that manages the old "line" number feature,
081817 - because we created a new design that if a numerical anchor is not
081818 - encountered, then default anchor is automatically used.
081819 -
081820 - Counter 58 sets a flag for the condition that a numerical anchor is
081821 - not present, so the default "xx" anchor is used.
081822 -
081823 - Line 1740, ref OF 3 3762, -label linxx, changed this code so if the
081824 - second pos is not a number, a 1st pos "0" will be entered to account
081825 - for the fact that the 2nd pos captured by 116 is either a space or
081826 - punctuation, so the first pos is really the 2nd pos.
081827 -
081828 - Now we have to figure out how to find the end of the string when
081829 - there is no anchor.
081830 -
081831 - Line 2240, ref OF 3 3895, -label fancR, this is the code that looks
081832 - for an anchor.  If counter 177 = 0 then the ending anchor HTML code
081833 - is entered after the anchor is found.
081834 -
081835 - Needed switch for -gosub cnuM so that 0000 anchor is entered in HTML
081836 - code string, but is omitted in code that does a fr/nnnn/ to look for
081837 - end of code string to enter the end of anchor html code.
081838 -
081839 - We could try to eliminate entering any anchor at all if it is 0000.
081840 - This would work for documents, but not for SDS records, because the
081841 - default condition for SDS records is the Diary ID line, and not top of
081842 - file.
081843 -
081844 - Line 2320, ref OF 3 5665, -label dwfi2, added a bunch of stuff to
081845 - handle this tricky condition.
081846 -
081847 -      Removed it because it didn't work.
081848 -
081849 - Line 2360, ref OF 3 6046, -label cnuM, changed this code to look for
081850 - the reference num, instead of the anchor, if the anchor is 0, so we
081851 - don't find a 0000 anchor for another reference if there are two of
081852 - them on the same line.
081853 -
081854 -      Over time, this problem will go away because there will be no
081855 -      more 0000 anchors, but people could still put them in and there
081856 -      is a ton of it already out there.
081857 -
081858 -
081859 -
081860 -
0819 -

SUBJECTS
0000 Default Follow Up Anchor

0904 -
090401 -  ..
090402 - 004  Create New SDS record in Schedule
090403 -
090404 - Follow up ref SDS 8 5481, ref SDS 6 1161.
090405 -
090406 - The question is that this code is working well with a standard
090407 - structure.  What benefit is there to changing it?  How much additional
090408 - code will it require, or will it take less code?  If we can reduce
090409 - the burden on Medit, hurray, let's do it.
090410 -
090411 - The only code that is affected is the first entry in a record, since
090412 - it is the only one that uses the default anchor, 0000. ref SDS 8 5481
090413 -
090414 - Line 1060, ref OF 1 9945, -label aw77, just below is the code that
090415 - enters the "0000" default anchor.
090416 -
090417 - I guess on Sunday afternoon at 2020, I will let this go.
090418 -
090419 - Since the code is wired to enter the thing automatically, it will add
090420 - or reduce the work load.  The only minor point is that it will be the
090421 - one place where the default anchor appears in the record.
090422 -
090423 -     [On 990520 added 0001 default anchor for the first record segment.
090424 -     ref SDS 11 9666]
090425 -
090426 -
090427 -
0905 -