I didn't anticipate the case that classic Icon (9.3.1) would produce 
different results, but I found that it gave the result that I originally 
expected:
  - main activates S
  - A transmits to S
  - when S activates &source it activates A

So, here are the vital statistics for the Unicon build that I am running:

Unicon Version 12.2.  Dec 2, 2014
MS Windows NT
POSIX
DBM
ASCII
co-expressions
concurrent threads
dynamic loading
environment variables
event monitoring
external functions
keyboard functions
large integers
multiple programs
pseudo terminals
system function
messaging
graphics
3D graphics
MS Windows
Win32
libz file compression
JPEG images
PNG images
SQL via ODBC
CCompiler MinGW gcc 4.8.1
Physical memory: 8299376640 bytes
Revision 3976
Arch x86_64
CPU cores 2

On 2/29/2016 8:12 AM, Art Eschenlauer wrote:
> I have a question regarding &source.
> The Icon documentation says &source is the "activator of current 
> co-expression"
> and that "x1 @ C activates C, transmitting the value of x1 to it".
> It does not specify that this is the source for the _first_ 
> activation, but that seems to be what I am getting below:
>  - main activates S
>  - A transmits to S
>  - when S activates &source it activates main rather than A
>
> I get the following output:
>
> main: co-expression_1(1)
> xpr_issue.icn:   23  | main; co-expression_1 : &null @ co-expression_2
> S: co-expression_2(0)
> xpr_issue.icn:    7  | main; co-expression_2 : &null @ co-expression_1
> xpr_issue.icn:   24  | main; co-expression_1 : &null @ co-expression_4
> A: co-expression_4(0)
> xpr_issue.icn:   19  | main; co-expression_4 : &null @ co-expression_3
> B: co-expression_3(0)
> xpr_issue.icn:   12  | main; co-expression_3 : "B1" @ co-expression_4
> xpr_issue.icn:   19  | main; co-expression_4 : "B1" @ co-expression_1
> [@A] B1
> xpr_issue.icn:   25  | main; co-expression_1 : &null @ co-expression_4
> xpr_issue.icn:   20  | main; co-expression_4 : "this is what suc..." @ 
> co-expression_2
> [S]  this is what success looks like
> xpr_issue.icn:    7  | main; co-expression_2 : "this is what suc..." @ 
> co-expression_1
> [@A] this is what success looks like
> xpr_issue.icn:   26  | main; co-expression_1 : "bye" @ co-expression_4
> xpr_issue.icn:   21  | main; co-expression_4 : &null @ co-expression_3
> xpr_issue.icn:   13  | main; co-expression_3 : "B2" @ co-expression_4
> xpr_issue.icn:   21  | main; co-expression_4 : "B2" @ co-expression_1
> [@A] B2
> xpr_issue.icn:   27  main failed
>
> from the following program:
>
> procedure main()
>   local A, B, S, r, s, source
>   &trace := -1
>   write("main: ", image(&current))
>   S := create {
>     write("S: ", image(&current))
>     while r := r @ &source do write("[S]  ", r)
>   }
>   B := create {
>     write("B: ", image(&current))
>     source := &source
>     "B1" @ source
>     "B2" @ source
>     "B has completed"@S
>   }
>   A := create {
>     write("A: ", image(&current))
>     source := &source
>     s := ((@B) @ source)
>     "this is what success looks like"@S
>     (s@B) @ source
>   }
>   @S
>   write("[@A] ", @A)
>   write("[@A] ", @A)
>   write("[@A] ", "bye"@A)
> end
>
> Why did r @ &source on line 7 (within coexpression S) transmit to main 
> when coexpression A transmitted to it ?


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to