Thread error line number
(11 answers)
Opened by linuxCowboy at 2014-12-17 21:57
nochmal mit Code:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #!/bin/bash echo "in bash line(3) $LINENO" LINE=$((LINENO + 6)) Fshell () { echo in func perler=$(cat <<'EOF' say "in perl line ", __LINE__; #### hier: #line ($ARGV[0] + __LINE__ + 1) !?? ####line 15 say "in perl line ", __LINE__; say "ARGV: $ARGV[0] line: ", __LINE__, " ARGV+line: ", $ARGV[0] + __LINE__; say "in perl line ", __LINE__; EOF ) echo "in bash line(22): $LINENO" perl -E "$perler" $LINE } 4067 0 /tmp $ . ./x1 && Fshell in bash line(3) 3 in func in bash line(22): 15 in perl line 1 in perl line 5 ARGV: 10 line: 7 ARGV+line: 17 in perl line 9 4068 0 /tmp $ Jetzt stelle ich #line scharf: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #!/bin/bash echo "in bash line(3) $LINENO" LINE=$((LINENO + 6)) Fshell () { echo in func perler=$(cat <<'EOF' say "in perl line ", __LINE__; #### hier: #line ($ARGV[0] + __LINE__ + 1) !?? #line 15 say "in perl line ", __LINE__; say "ARGV: $ARGV[0] line: ", __LINE__, " ARGV+line: ", $ARGV[0] + __LINE__; say "in perl line ", __LINE__; EOF ) echo "in bash line(22): $LINENO" perl -E "$perler" $LINE } 4068 0 /tmp $ . ./x1 && Fshell in bash line(3) 3 in func in bash line(22): 15 in perl line 1 in perl line 15 ARGV: 10 line: 17 ARGV+line: 27 in perl line 19 4069 0 /tmp $ Ich würde gern die Berechnung des #line-Offsets in Zeile 13 irgendwie an #line übergeben, doch die nimmt nur digits!?? |