text:
Am I over the speed limit?
Given an ascii-art road and the time it took me to cross it, tell me if I was speeding.
Units
Distance is in the arbitrary unit of d. Time is in the arbitrary unit of t.
The road
Here is a simple road:
10=====

The 10 means 10 d per t. That is the speed limit for the road. The road has 5 =s, so its d is 5. Therefore, if I cross that road in 0.5 t, I went 10 d per t, because 5/0.5 = 10. The speed limit of that road is 10, so I stayed within the speed limit.
But if I cross that road in 0.25 t, I went 20 d per t, because 5/0.25 = 20. The speed limit of that road is 10, so I went 10 over the speed limit.
Examples and calculations
Note that input 1 is the time I took to travel the road, and input 2 is the road itself.
Here is a complex road:
Input 1: 1.5
Input 2: 5=====10=====

The fastest I could have (legally) gone on the first road (the first 5 =s) is 5 d per t. Since 5 (distance) divided by 5 (speed limit) is 1, the fastest I could have gone on that road is 1 t.
On the next road, the speed limit is 10 and the distance is also 5, the fastest I could cross that is 0.5 (5/10). Totaling the minimum times results in 1.5, meaning I went at exactly the speed limit.
Note: I know, I might have been going really fast on one road and really slow on another and still cross in 1.5, but assume the best here.
A final example:
Input 1: 3.2
Input 2: 3.0==========20===

The first road is 10 long and has a speed limit of 3, so the minimum time is 3.33333... (10 / 3.)
The second road is 3 long and has a speed limit of 20, so the minimum time is 0.15 (3 / 20.)
Totaling the times results in 3.483333333... I crossed it in 3.2, so I had to be speeding somewhere.
Notes:

You must output one distinct value if I am undoubtedly speeding, and another different value if I might not be.
Your program or function may require input or output to have a trailing newline, but please say so in your submission.
Your first input will be my speed. It will be a positive float or integer or string.
Your second input will be the road. It will always match the regex ^(([1-9]+[0-9]*|[0-9]+\.[0-9]+)=+)+\n?$. You may test out potential inputs here if you are interested.
You may take input in 2 parameters of a function or program, in 2 separate files, from STDIN twice, or from a space-separated string passed to STDIN, a function, a file or a command-line parameter.
If you would like to, you can change the order of the inputs.
Any questions? Ask below in comments and happy code-golfing!

I think this question would benefit from a couple of input→output examples.

Looks like no one is correctly handling the decimal points that could be present in the road speed limits.

Try looking at the speedometer?

@programmer5000 Then, feel free to use this regex instead ^(([1-9]+[0-9]*|(?!0\.0+\b)[0-9]+\.[0-9]+)=+)+\n?$. (It would have been cleaner with a lookbehind, but then it would need .Net engine)

05AB1E, 24 22 bytes
Returns 1 when undoubtedly speeding and 0 otherwise.
Saved 2 bytes thanks to carusocomputing.
'=¡õK¹S'=Q.¡O0K/O-§'-å

Try it online!
-§'-å shouldn't have to be more than a simple comparison, but for some reason neither › nor ‹ seem to work between the calculated value and the second input.
Explanation
Using 3.0==========20===, 3.2 as example
'=¡                        # split first input on "="
   õK                      # remove empty strings
                           # STACK: ['3.0', '20']
     ¹S                    # split first input into a list of chars
       '=Q                 # compare each to "="
          .¡O              # split into chunks of consecutive equal elements and sum
                           # STACK: ['3.0', '20'], [0, 10, 0, 3]
             0K            # remove zeroes
                           # STACK: ['3.0', '20'], [10, 3]
               /           # element-wise division
                           # STACK: [3.3333333333333335, 0.15]
                O          # sum
                           # STACK: 3.4833333333333334
                 -         # subtract from second input
                           # STACK: -0.2833333333333332
                  §        # implicitly convert to string
                   '-å     # check if negative
                           # OUTPUT: 1

'=¡õK¹S'=QJ0¡õK€g/O-0.S for 23 bytes

@ovs: So .S works, OK. That doesn't return 2 unique values though as it will return 0 when you've done exactly the speed limit.

@Emigna gahh... I keep posting the wrong one; the a > b operator is casting to integer before the comparison between a float and an int. It's very odd indeed... I did get it down to 22 bytes though: '=¡€Þ¹S'=Q.¡O0K/O-§'-å.

@carusocomputing: Nice! Chunkifying with summation was a good idea.

@carusocomputing: The final version you had before deleting could be shortened to ¨'=¡.¡2ôvyg>s/}O-§'-å at 23 with 2 return values. Maybe there is some improvement to be made there still? I Don't see what though. That last comparison really screws us up.

I still think something can be done with €Þ to mitigate the final compare.

@carusocomputing: In this case €Þ has the same effect as õK so unfortunately I don't see how that will make a difference. I really feel there should be some way to golf that final compare though.

Python 2, 71 bytes
m,s=input()
for c in s.split('=')[:-1]:s=float(c or s);m-=1/s
print m<0

Try it online!
Python's dynamic type system can take quite some abuse.
Splitting the input string s.split('=') turns k equal signs into k-1 empty-string list elements (except at the end, where one must be cut off). For example,
"3.0===20====".split('=')[:-1] == ['3.0', '', '', '20', '', '', '']

The code iterates over these elements, updating the current speed s each time it sees a number. The update is done as s=float(c or s), where if c is a nonempty string, we get float(c), and otherwise c or s evaluates to s, where float(s) just keeps s. Note that c is a string and s is a number, but Python doesn't require doesn't require consistent input types, and float accepts either.
Note also that the variable s storing the speed is the same one as taking the input string. The string is evaluated when the loop begins, and changing it within the loop doesn't change what is iterated over. So, the same variable can be reused to save on an initialization. The first loop always has c as a number, so s=float(c or s) doesn't care about s's initial role as a string.
Each iteration subtracts the current speed from the allowance, which starts as the speed limit. At the end, the speed limit has been violated if this falls below 0.

I must point out that this is a property of Python's dynamic typing (performing type checking at runtime rather than compile time), not weak typing. Python's types are actually pretty strong (it's not usually possible to convert values between types without an explicit instruction).

@Muzer My mistake, fixed it.

Python 3, 79 bytes
import re;g=re.sub
lambda m,s:eval(g('=','-~',g('([^=]+)',r'0+1/\1*',s))+'0')>m

Try it online!
For example, the input 3.0==========20=== is converted to the string
0+1/3.0*-~-~-~-~-~-~-~-~-~-~0+1/20*-~-~-~0

and evaluated, and the result is compared to the input speed. Each -~ increments by 1. I'm new to regexes, so perhaps there's a better way, like making both substitutions at once. Thanks to Jonathan Allan for pointing out how to match on all but the = character.

It still doesn't seem to be able to handle floats.

@L3viathan Could you give an example where it goes wrong?

For example when the road is "0.5=20===", the output will be None regardless of the time input.

Ah, divide by zero...

I think ([\d|.]+) may fix it.

@JonathanAllan That works. Do you know if there might be a shorter way to match non-=?

Maybe ^= would do the job...

@L3viathan I believe this should fix it.

...make that ([^=]+). EDIT - I see you got it :)

Welcome to team regex!

GNU C, 128 bytes
#import<stdlib.h>
f(float t,char*r){float l,s=0;for(;*r;){for(l=atof(r);*(++r)-61;);for(;*r++==61;)s+=1/l;--r;}return t<s-.001;}

Handles non-integer speed limits also. #import<stdlib.h> is needed for the compiler not to assume that atof() returns an int.
t<s-.001 is needed to make the exact speed limit test case to work, otherwise rounding errors cause it to think you were speeding. Of course, now if the time is 1.4999 instead of 1.5, it doesn't consider that speeding. I hope that's okay.
Try it online!

Javascript (ES6), 63 bytes
a=>b=>eval(b.replace(/([^=]+)(=+)/g,(_,c,d)=>'+'+d.length/c))>a

Usage
Assign this function to a variable and call it using the currying syntax. The first argument is the time, the second is the road.
Explanation
Matches all consecutive runs of characters that are not equal signs followed by a run of equal signs. Each match is replaced by the result of the inner function, which uses two arguments: the run of equal signs (in variable d) and the number (variable c). The function returns the length of the road devided by the number, prepended by a +.
The resulting string is then evaluated, and compared against the first input.
Stack Snippet

let f=
a=>b=>eval(b.replace(/([^=]+)(=+)/g,(_,c,d)=>'+'+d.length/c))>a
<input id="time" placeholder="time" type="number">
<input id="road" placeholder="road">
<button onclick="output.innerHTML=f(time.value)(road.value)">Process</button>

Perl 5, 43 bytes
42 bytes of code + -p flag.
s%[^=]+(=+)%$t+=(length$1)/$&%ge;$_=$t<=<>

Try it online!
For each group of digit followed by some equal signs ([^=]+(=+)), we calculate how much time is needed to cross it (number of equals divided by the speed: (length$1)/$&) and sum those times inside $t. At the end, we just need to check that $t is less than the time you took to cross it ($_=$t < <>). The result will be 1 (true) or nothing (false).

Doesn't seem to handle decimal numbers.

@L3viathan right, thanks for pointing it out. (There wasn't any test case with decimal numbers and I read the specs a bit too fast)

Mathematica, 98 bytes
Tr[#2~StringSplit~"="//.{z___,a_,b:Longest@""..,c__}:>{z,(Length@{b}+1)/ToExpression@a,c}]-"
"<=#&

Pure function taking two arguments, a number (which can be an integer, fraction, decimal, even π or a number in scientific notation) and a newline-terminated string, and returning True or False. Explanation by way of example, using the inputs 3.2 and "3==========20===\n":
#2~StringSplit~"=" produces {"3","","","","","","","","","","20","","","\n"}. Notice that the number of consecutive ""s is one fewer than the number of consecutive =s in each run.
//.{z___,a_,b:Longest@""..,c__}:>{z,(Length@{b}+1)/ToExpression@a,c} is a repeating replacement rule. First it sets z to the empty sequence, a to "3", b to "","","","","","","","","" (the longest run of ""s it could find), and c to "20","","","\n"; the command (Length@{b}+1)/ToExpression@a evaluates to (9+1)/3, and so the result of the replacement is the list {10/3, "20","","","\n"}.
Next the replacement rule sets z to 10/3, a to "20", b to "","", and c to "\n". Now (Length@{b}+1)/ToExpression@a evaluates to (2+1)/20, and so the result of the replacement is {10/3, 3/20, "\n"}. The replacement rule can't find another match, so it halts.
Finally, Tr[...]-"\n" (it saves a byte to use an actual newline between the quotes instead of "\n") adds the elements of the list, obtaining 10/3 + 3/20 + "\n", and then subtracts off the "\n", which Mathematica is perfectly happy to do. Finally, <=# compares the result to the first input (3.2 in this case), which yields False.

Does it work with floating point speeds?

Yes, anything that Mathematica recognizes as a number. The input could be "1+2====3.456====π=====\n" even.

Jelly, 27 bytes
ṣ”=V€ḟ0
Œr”=e$ÐfṪ€ż⁸Ç¤÷/€S>

Try it online!
Note: assumes that the regex given in the question should be such that a speed limit cannot be 0.0, 0.00, etc. - just like it cannot be 0 (confirmed as an unintentional property).
How?
ṣ”=V€ḟ0 - Link 1, speed limits: road          e.g. "4.0===22=="
ṣ”=     - split by '='                             [['4','.','0'],[],[],['2','2'],[],[]]
   V€   - evaluate €ach as Jelly code              [4.0,0,0,22,0,0]
     ḟ0 - filter discard zero                      [4.0,22]

Œr”=e$ÐfṪ€ż⁸Ç¤÷/€S> - Main link: road, time   e.g. "4.0===22==", 0.84
Œr                  - run-length encode            [['4',1],['.',1],['0',1],['=',3],['2',2],['=',2]]
      Ðf            - filter keep:
     $              -     last two links as a monad:
  ”=                -         "="
    e               -         is an element of?    [['=',3],['=',2]]
        Ṫ€          - tail €ach                    [3,2]
             ¤      - nilad followed by link(s) as a nilad:
           ⁸        -     left argument (road)
            Ç       -     last link (1) as a monad [4.0,22]
          ż         - zip                          [[3,4.0],[2,22]]
              ÷/€   - reduce €ach by division      [0.75, 0.09090909090909091]
                 S  - sum                          0.8409090909090909
                  > - greater than time?           1 (would be 0 if maybe not speeding)

Yes, I explicitly stated about 0.0 since I filter out values that evaluate as 0 in the code to pull out the speed limits.

Python 3, 90 bytes
import re
lambda t,r:sum(x.count("=")/eval(x.strip("="))for x in re.findall("\d+\D+",r))>t

Outputs True if you're speeding, False if you might not be. Does not require (but will work with) trailing newline.
Despite it not looking like it would, it correctly handles floats in both input time and speed limits, because the regex is just used to seperate the road segments.

MATL, 31 30 bytes
t61=TwFhhdfd1wY{1L&)o!oswcU!/s<

Inputs are: a string (speed limits and roads), then a number (used speed). Output is 1 if undoubtedly speeding, 0 if not.
Try it online!
Explanation with example
Consider inputs '3.0==========20===' and 3.2.
1       % Push 1
        % STACK: 1
y       % Implicitly input string. Duplicate from below
        % STACK: '3.0==========20===', 1, '3.0==========20==='
61=     % Compare with 61 (ASCII for '=')
        % STACK: '3.0==========20===', 1, [0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1]
TwFhh   % Prepend true (1) and append false (0)
        % STACK: '3.0==========20===', 1, [1 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0]
d       % Consecutive differences
        % STACK: '3.0==========20===', 1, [-1 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 1 0 0 -1]
f       % Find: indices of nonzeros
        % STACK: '3.0==========20===', 1, [1  4 14 16 19]
d       % Consecutive differences. Gives length of substrings of numbers or roads
        % STACK: '3.0==========20===', 1, [3 10 2 3]
Y{      % Split string according to those lenghts. Gives a cell array of strings
        % STACK: {'3.0', '==========', '20', '==='}
1L&)    % Split into odd- and even-indexed subarrays
        % STACK: {'3.0', '20'}, {'==========', '==='}
o       % Convert to 2D numeric array. Right-pads with zeros
        % STACK: {'3.0', '20'}, [61 61 61 61 61 61 61 61 61 61; 61 61 61 0 0 0 0 0 0 0]
!gs     % Number of nonzeros in each row
        % STACK: {'3.0', '20'}, [10 3]
w       % Swap
        % STACK: [10 3], {'3.0', '20'}
c       % Convert to 2D char array. Right-pads with spaces
        % STACK: [10 3], ['3.0'; '20 ']
U       % Convert each row to a number
        % STACK: [10 3], [3.0; 20]
!       % Transpose
        % STACK: [10 3], [3.0 20]
/       % Divide, element-wise
        % STACK: [3.3333 0.15]
s       % Sum of array
        % STACK: 3.4833
<       % Implicitly input number. Less than? Implicitly display (true: 1; false: 0)
        % STACK: true

TI-Basic, 168 165 bytes
Prompt Str0,T
Str0+"0→Str0
0→I
1→A
While inString(Str0,"=",A
I+1→I
I→dim(L1
I→dim(L2
0→L
inString(Str0,"=",A→B
expr(sub(Str0,A,B–A→L1(I
While 1=expr("9"+sub(Str0,B,1)+"9
L+1→L
B+1→B
If B>length(Str0
Return
End
B→A
L→L2(I
End
T≥sum(seq(L2(X)/L1(X),X,1,I

Input is the road as Str0 and the time as T. Make sure to precede the road with a quote, eg Str0=?"14========3===.
Output is 0 if speeding, 1 if possibly not speeding.
Prompt Str0,T                      # 6 bytes
Str0+"0→Str0                       # 9 bytes
0→I                                # 4 bytes
1→A                                # 4 bytes
While inString(Str0,"=",A          # 12 bytes
I+1→I                              # 6 bytes
I→dim(L1                           # 6 bytes
I→dim(L2                           # 6 bytes
0→L                                # 4 bytes
inString(Str0,"=",A→B              # 13 bytes
expr(sub(Str0,A,B–A→L1(I           # 16 bytes
While 1=expr("9"+sub(Str0,B,1)+"9  # 21 bytes
L+1→L                              # 6 bytes
B+1→B                              # 6 bytes
If B>length(Str0                   # 8 bytes
Return                             # 2 bytes
End                                # 2 bytes
B→A                                # 4 bytes
L→L2(I                             # 7 bytes
End                                # 2 bytes
T≥sum(seq(L2(X)/L1(X),X,1,I        # 21 bytes

APL, 41 bytes
{⍺<+/{(≢⍵)÷⍎⍺}/¨Y⊂⍨2|⍳⍴Y←⍵⊂⍨X≠¯1⌽X←⍵='='}

This takes the road as a string as its right argument, and the time taken as its left argument, and returns 1 if you were speeding and 0 if not, like so:
      3.2{⍺<+/{(≢⍵)÷⍎⍺}/¨Y⊂⍨2|⍳⍴Y←⍵⊂⍨X≠¯1⌽X←⍵='='}'3.0==========20==='
1

Explanation:

X←⍵='=': store in X a bit vector of all positions in ⍵ that are part of the road.
X≠¯1⌽X: mark each position of X that is not equal to its right neighbour (wrapping around), giving the positions where numbers and roads start
Y←⍵⊂⍨: split ⍵ at these positions (giving an array of alternating number and road strings), and store it in Y.
Y⊂⍨2|⍳⍴Y: split up Y in consecutive pairs.
{(≢⍵)÷⍎⍺}/¨: for each pair, divide the length of the road part (≢⍵) by the result of evaluating the number part (⍎⍺). This gives the minimum time for each segment.
+/: Sum the times for all segments to get the total minimum time.
⍺<: Check whether the given time is less than the minimum or not.

Bash, 151 bytes
Running as (for example) $ bash golf.sh .5 10=====:
shopt -s extglob
r=$2
while [ -n "$r" ];do
f=${r%%+(=)}
s=`dc<<<"9k$s $[${#r}-${#f}] ${f##*=}/+p"`
r=${f%%+([0-9.])}
done
[[ `dc<<<"$1 $s-p"` != -* ]]

Explanation
shopt -s extglob
r=$2

Enable bash's extended pattern-matching operators and assign the road to a variable r.
while [ -n "$r" ];do
f=${r%%+(=)}

Loop until r is empty. Set f to r with all equal signs removed from the end, using the %% parameter expansion and the +() extended globbing operator.
s=`dc<<<"9k$s $[${#r}-${#f}] ${f##*=}/+p"`

Assign to s a running sum of the minimum times for each road segment. This can be re-written (perhaps slightly) more readably as:
s=$(dc <<< "9k $s $[${#r}-${#f}] ${f##*=} / + p")

Basically what's going on here is we're using a here-string to get the dc command to do math for us, since bash can't do floating-point arithmetic by itself. 9k sets the precision so our division is floating-point, and p prints the result when we're done. It's a reverse-polish calculator, so what we're really calculating is ${f##*=} divided by $[${#r}-${#f}], plus our current sum (or, when we first run through and s hasn't been set yet, nothing, which gets us a warning message on stderr about dc's stack being empty, but it still prints the right number because we'd be adding to zero anyway).
As for the actual values we're dividing: ${f##*=} is f with the largest pattern matching *= removed from the front. Since f is our current road with all the equal signs removed from the end, this means ${f##*=} is the speed limit for this particular stretch of road. For example, if our road r were '10=====5===', then f would be '10=====5', and so ${f##*=} would be '5'.
$[${#r}-${#f}] is the number of equal signs at the end of our stretch of road. ${#r} is the length of r; since f is just r with all the equal signs at the end removed, we can just subtract its length from that of r to get the length of this road section.
r=${f%%+([0-9.])}
done

Remove this section of road's speed limit from the end of f, leaving all the other sections of road, and set r to that, continuing the loop to process the next bit of road.
[[ `dc<<<"$1 $s-p"` != -* ]]

Test to see if the time we took to travel the road (provided as $1) is less than the minimum allowed by the speed limit. This minimum, s, can be a float, so we turn to dc again to do the comparison. dc does have a comparison operator, but actually using it ended up being 9 more bytes than this, so instead I subtract our travel time from the minimum and check to see if it's negative by checking if it starts with a dash. Perhaps inelegant, but all's fair in love and codegolf.
Since this check is the last command in the script, its return value will be returned by the script as well: 0 if possibly speeding, 1 if definitely speeding:
$ bash golf.sh .5 10===== 2>/dev/null && echo maybe || echo definitely
maybe
$ bash golf.sh .4 10===== 2>/dev/null && echo maybe || echo definitely
definitely

Python 3.6, 111 bytes
My first code golf!
import re
def f(a,b):
 t=0
 for c in re.split('(=+)',b)[:-1]:
  try:s=float(c)
  except:t+=len(c)/s
 return a<t

Try it online!
re.split('(=+)',b)[:-1]
Splits the road by chunks of =.
It then iterates over the result, using try:s=float(c) to set the current speed limit if the current item is a number or except:t+=len(c)/s to add the time to traverse this section of road to the cumulative total.
Finally it returns the time taken to the fastest possible time.

Congratulations on your first code golf! Nicely done!

C# method (137 122 bytes)
Requires using System.Linq adding 19 bytes, included in the 122:
bool C(float t,string r,float p=0)=>r.Split('=').Aggregate(t,(f,s)=>f-(s==""?p:p=1/float.Parse(s)))<-p;

Expanded version:
bool Check(float time, string road, float pace=0) =>
    road.Split('=')
        .Aggregate(time, (f, s) => f - (
            s == ""
            ? pace
            : pace = 1 / float.Parse(s)))
        < -pace;

The road string is split on the = character. Depending on whether a string is the resulting array is empty, the aggregate function sets the pace variable for the segment (denoting the time it takes to travel a single =) and subtracts it from the time supplied. This will do one too many substractions (for the final road segment), so instead of comparing to 0, we compare to -pace

PHP5 207 202 bytes
First effort at a code golf answer, please go easy on me. I'm sure one of you geniuses will be able to shorten this significantly, any golfing tips are welcome.
function s($c,$d){foreach(array_filter(split("[{$d}/=]",$c)) as $e){$f[]=$e;};return $f;}function x($a,$b){$c=s($b,"^");$d=s($b,"");for($i=0;$i<sizeof($c);$i++){$z+=strlen($c[$i])/$d[$i];}return $a<$b;}

Invoke with
x("1.5","3.0==========20===")

Returns true if you have been under the speed limit, false otherwise

Nice first submission!

Cut 5 chars by realising I didn't need to declare $z before accessing it in the loop

Dyalog APL, 27 bytes
<∘(+/(⍎'='⎕r' ')÷⍨'=+'⎕s 1)
'=+'⎕s 1 is a function that identifies stretches of '=' with a regex and returns a vector of their lengths (⎕s's right operand 0 would mean offsets; 1 - lengths; 2 - indices of regexes that matched)
'='⎕r' ' replaces '='s with spaces
⍎'='⎕r' ' executes it - returns a vector of speeds
÷⍨ in the middle divides the two vectors (⍨ swaps the arguments, so it's distance divided by speed)
+/ is sum
everything so far is a 4-train - a function without an explicit argument
<∘ composes "less than" in front of that function; so, the function will act only on the right argument and its result will be compared against the left argument

F# (165 bytes)
let rec c t p l=
 match l with
 |[]->t<0.0
 |x::xs->
  match x with
  |""->c(t-p)p xs
  |_->c(t-p)(1.0/float x)xs
let s t (r:string)=r.Split '='|>Seq.toList|>c t 0.0

I'm still new to F#, so if I did anything weird or stupid, let me know.

R, 100 bytes
function(S,R){s=strsplit(R,"=")[[1]]
s[s==""]=0
S<sum((1+(a=rle(as.double(s)))$l[!a$v])/a$v[a$v>0])}

Try it online!
Returns TRUE for unambiguously speeding values, FALSE for possibly unspeedy ones.

PowerShell, 71 bytes
param($t,$r)$t-lt($r-replace'(.+?)(=+)','+($2)/$1'-replace'=','+1'|iex)

Try it online!
Test script:
$f = {

param($t,$r)$t-lt($r-replace'(.+?)(=+)','+($2)/$1'-replace'=','+1'|iex)

}

@(
    ,(1.5, "5=====10=====", $false)
    ,(3.2, "3.0==========20===", $true)
) | % {
    $time,$road,$expected = $_
    $result = &$f $time $road
    "$($result-eq$expected): $result"
}

Output:
True: False
True: True

Explanation:

The script gets the elements of the road 5=====10=====, swaps elements, adds brackets and operators +(=====)/5+(=====)/10
Then the script replaces each = with +1: +(+1+1+1+1+1)/5+(+1+1+1+1+1)/10
Finally, the script evaluates the string as a Powershell expression and compare it with the first argument.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
This challenge uses the '+' character
Your task: given a number n, generate a '+' sign that is n characters  away from its center. If this is confusing, check out the test cases.
Standard methods of input: output must be a string or printed. Standard loopholes apply.
Input: 1
Output: +           ] 1 away from center `+`.

Input: 2
Output:  +          ] 2 away from center `+`.
        +++         ] 1 away from center `+`.
         +

Input: 3
Output:   +         ] 3 away from center `+`.
          +
        +++++
          +
          +

This is code-golf, so shortest code wins!

I assume trailing spaces on each line are allowed so that the result is square, right?

@LuisMendo Yes, that is fine.

Related.

"generate a '+' sign that is n characters away from its center" -- I don't understand this part.  What center are you referring to?  How can something be eccentric to itself?  Please clarify.

@Wossname The length of each 'spoke' of the plus sign is equal to n. The + in the middle is the center, but it is considered 1 away from the center. If something is next to it, it is 2 away from the center. Anything next to that is 3 away. And so on. Try running some existing programs.

It would have been a lot less confusing if the centre were 0 away from itself.

Charcoal, 5 bytes
Ｐ+×+Ｎ

Try it online!

What even is this language?

@DJMcMayhem Basically you can do turtle graphics ASCII art with it. It has a lot of handy builtins for rendering different kind of ASCII shapes (like Ｐ+ = cross).

Are those not multibyte characters?

@Petah Charcoal uses a custom codepage.

@fergusq You might be mixing Charcoal up with Turtlèd :P, Charcoal isn't really a turtle graphics language

Python 2, 53 bytes
n=2*input()-1;C='+'.center
for c in C(n):print C(n,c)

Try it online!

JavaScript (ES6), 67 65 63 60 59 bytes
x=>(v=(` `[r=`repeat`](--x)+`+
`)[r](x))+`+`[r](x*2)+`+
`+v;

2 bytes saved by replacing two occurrences of x-1, the first with --x and the second with x.
2 bytes saved thanks to Kritixi Lithos, replacing "\n" with `[newline]`.
3 bytes saved thanks to user2428118, finally helping me to figure out a way to alias the repeat in a way that reduced the size. (With honourable mention to Marie for her efforts, too)
1 byte saved indirectly thanks to Herman.

Try It

f=
x=>(v=(` `[r=`repeat`](--x)+`+
`)[r](x))+`+`[r](x*2)+`+
`+v;
oninput=_=>o.innerText=f(+i.value)
o.innerText=f(i.value=3)
<input id=i min=1 type=number>

I'm not entirely sure, but I think you can replace the "\n" with two backticks and a literal newline between them

Thanks, @KritixiLithos; don't know why I didn't think of that sooner myself.

It looks like you could probably save a byte by aliasing repeat, e.g. a='repeat',v=..... and \ `[a]`

Thanks, @Marie; I had tried aliasing repeat() but my first few attempts came out 2 or 3 bytes bigger so I abandoned it! I'll have another look at it when I get back in front of a computer.

I see. I did think it would save a bit more but it looks like one byte. An easy comparison is basically a='repeat',[a][a][a] vs .repeat.repeat.repeat, 20 vs 21 respectively.

Just tried it myself now quickly, @Marie, but the best I could manage was to match the current byte count. I've included them as alternatives above in case someone can see something I might have missed.

This was how I did it, minus the line breaks x=>(a='repeat',v=(` `[a](--x)+`+`)[a](x))+`+`[a](x*2+1)+``+v

x=>(v=(` `[r='repeat'](--x)+`+<newline>`)[r](x))+`+`[r](x*2+1)+`<newline>`+v

Sweet! Thanks, @user2428118. Guess I couldn't see the wood for the trees!

@Shaggy I'm very new in this community. How do you event count generated bytes?

MATL, 11 bytes
tZv=&+g43*c

Try it online!
Explanation with example
Consider n = 3.
t     % Implicitly input n. Duplicate
      % STACK: 3, 3
Zv    % Symmetric range
      % STACK: 3, [1 2 3 2 1]
=     % Equal, element-wise
      % STACK: [0 0 1 0 0]
&+    % All pair-wise additions. Gives a 2D array
      % STACK: [0 0 1 0 0;
                0 0 1 0 0;
                1 1 2 1 1;
                0 0 1 0 0;
                0 0 1 0 0]
g     % Logical: convert non-zero to one
      % STACK: [0 0 1 0 0;
                0 0 1 0 0;
                1 1 1 1 1;
                0 0 1 0 0;
                0 0 1 0 0]
43*   % Multiply by 43 (ASCII for '+'), element-wise
      % STACK: [ 0  0 43  0  0;
                 0  0 43  0  0;
                43 43 43 43 43;
                 0  0 43  0  0;
                 0  0 43  0  0]
c     % Convert to char. Char 0 is displayed as space. Implicitly display.
      % STACK: ['  +  ';
                '  +  ';
                '+++++';
                '  +  ';
                '  +  ']

Charcoal, 16 13 bytes
Ｎα×+α←↑×+α‖Ｏ↘

Try it online!
Uses a different approach from the other Charcoal answer.
Explanation
Ｎα                       # Take input and store it in variable α
×+α                       # α times write a +
←                         # Go left
↑×+α                      # α times write a + upwards

Now the top left corner is complete, it will look something like this:
  +
  +
+++

‖Ｏ↘                      # Reflect-overlap it in a SE direction

The last step is the key to this program, it uses the top-left part of the plus to generate the rest of the plus by reflecting it in the southeast direction (rightwards and downwards).

Does Charcoal have its own code page? Many of those characters are multiple bytes in UTF-8.

@TRiG Yes, it does!

This can be simplified to ×+Ｎ‖Ｏ<.

Shakespeare Programming Language, 749 743 666 625 bytes
N.Puck,.Page,.Ford,.Ajax,.Act I:.Scene I:.[Enter Puck and Ford]Puck:Listen tothy!Ford:You is the difference betweena cat I.Scene V:.[Exeunt][Enter Page and Ajax]Ajax:You is the difference betweena cat Ford.Scene X:.Page:You is the product ofPuck I.Is you as big as zero?If soyou is the sum oftwice the sum oftwice twice the sum ofa big big cat a cat a cat a cat.If notyou big big big big big cat.Speak thy!Ajax:You is the sum ofyou a cat.Is you worse Ford?If soLet usScene X.Page:You is twice the sum ofa big big cat a cat.Speak thy![Exit Page][Enter Puck]Ajax:You is the sum ofyou a cat.Is you worse Ford?If soLet usScene V.

Try it online!
With added newlines:
N.
Puck,.
Page,.
Ford,.
Ajax,.
Act I:.
Scene I:.
[Enter Puck and Ford]
Puck:Listen tothy!
Ford:You is the difference betweena cat I.
Scene V:.
[Exeunt]
[Enter Page and Ajax]
Ajax:You is the difference betweena cat Ford.
Scene X:.
Page:You is the product ofPuck I.Is you as big as zero?
If soYou is the sum ofTwice the sum ofTwice twice the sum ofA big big cat a cat a cat a cat.
If notyou big big big big big cat.Speak thy!
Ajax:You is the sum ofyou a cat.Is you worse Ford?If soLet usScene X.
Page:You is twice the sum ofa big big cat a cat.Speak thy!
[Exit Page]
[Enter Puck]
Ajax:You is the sum ofyou a cat.Is you worse Ford?If soLet usScene V.

Golfed 6 bytes because scene numbers don't have to be consecutive. Golfed some more bytes by applying the tips in the new answers to the Shakespeare tips question, though these golfs aren't reflected in the explanation.
(Slightly outdated) explaination
SPL is an esolang designed to look like Shakespeare plays. Positive nouns have the value of 1 (here cat is used) and negative nouns have the value of -1 (none were used but pig is one of them). Adjectives modify a constant by multiplying it by 2.
N.

Everything until the first dot is the title and doesn't matter.
Puck,.                           row counter
Page,.                           column counter
Ford,.                           input
Ajax,.                           temp

The characters are integer variables, each of them also has a stack but I did not need to use that feature.
Act I:.
Scene I:.

Acts and scenes are used as goto labels
[Enter Puck and Ford]

It's only useful if exactly two characters are on the stage at the same time.
Puck:Listen to thy heart!

Reads a number and makes Ford remember it.
Ford:You is the difference between a cat and I.

As you can see Engrish is valid in SPL. This makes Puck's value "the different between a cat and I". But what does it mean? cat is a positive noun, so it's Puck = 1 - Ford.
Scene II:.
[Exeunt]

Exeunt is just a plural of "exit", and without arguments means that everyone on the stage exits.
[Enter Page and Ajax]
Ajax:You is the difference between a cat and Ford.

It's also Page = 1 - Ford but it's spoken by a different actor so I would be wrong. Since it's a loop, I can't just copy the value of Puck.
Scene III:.
Page:You is the product of Puck and I.

Pretty straightforward by now. Ajax = Puck * Page.
Is you as big as zero?

"as [adj] as" is the == operator.
If so,you is the sum of the sum of the sum of a big big big big big cat and a big big big cat and a big cat and a cat.

If Ajax == 0... "cat" is 1, "big cat" is 2, "big big cat" is 4 and so on. After substituting the simple constants we get "the sum of the sum of the sum of 32 and 8 and 2 and 1" -> "the sum of the sum of 40 and 2 and 1" -> "the sum of 42 and 1" -> "43", which is the ASCII for +.
If not,you fat fat fat fat fat cat.

else it's just "fat fat fat fat fat cat", so Ajax gets the value of 32, the ASCII for a space.
Speak thy mind!

This is the command for outputting a character.
Ajax:
You sum you and cat.Is you as big as Ford?If not,let us return to Scene III.

This is a loop construct. "You sum you and cat" increments Page, and if(Page != Ford) goto Scene III. The rest of the program uses the same components, so here is a more readable pseudocode version:

Scene1:
    input = [input number];
    row = 0 - input + 1;
Scene2:
    col = 0 - input + 1;
Scene3:
    temp = row * col;
    if(temp == 0){
        temp = '+';
    }else{
        temp = ' ';
    }

    putchar(temp);
    Page = Page + 1;
    if(Page != Ford) goto Scene3;
    Ajax = 10;
    putchar(Ajax);
    Puck = Puck + 1;
    if(Puck != Ford) goto Scene2;

"If not,let us return to Scene III." -1; breaks fourth wall :P

Jelly, 11 bytes
ṬŒB»þ`ị⁾+ Y

Try it online!

fingers crossed :-P

Mathematica, 39 bytes
Print@@@(CrossMatrix[#-1]"+"/. 0->" ")&

CrossMatrix is a built-in that generates a matrix of the required shape with 1s instead of +s and 0s instead of spaces. If we multiply that matrix by "+", that replaces the 1s with +s while leaving the 0s unchanged (obviously... 0*x = 0 and 1*x = x, right?). Then we replace the zeros manually with spaces using /. 0->" ". Finally, we print each line of the matrix with Print@@@(...).

Didn't know Print could be used like that.

C, 69 bytes
Not very interesting... Loops over the square, printing out the appropriate character.
r,c;f(n){for(r=-n;++r<n;puts(""))for(c=-n;++c<n;putchar(r*c?32:43));}

GNU sed, 104 99 bytes
-5 thanks to seshoumara
Includes +1 for -r
s/1//;h;:;s/(.*)1/ \12/;t;s/( *2)2(2*)/\1\n\1\2/
t;G;s/1+/&&1/;s/(.*)(\n1*)/&\n\1/;/1/!c+
y/12/++/

Takes input in unary.
Try it online!
s/1//                    # Subtract 1 from input
h                        # Hold onto input
:                        # Start loop
s/(.*)1/ \12/            #   Remove a 1, prepend a space, and append a 2
t                        # Loop until all 1s are 2s
                         # Start Loop (uses the previous label)
s/( *2)2(2*)/\1\n\1\2/   #   Shift all but the first 2 from the last line to a new line
                         #   E.g.  "  2"      "  2"
                         #         "  222" -> "  2"
                         #                    "  22"
t                        # Loop until all 2s are on their own line
G                        # Append a newline and input
s/1+/&&1/                # Double the number of 1s and append an extra
s/(.*)(\n1*)/&\n\1/      # Copy all of the lines with 2s to the end
/1/!c+                   # If there aren't any 1s print a '+'
y/12/++/                 # Convert all 1s and 2s to +s

+1 You can save 5 bytes by using s/( *2)2(2*)/\1\n\1\2/ and s/(.*)(\n1*)/&\n\1/ as shown here, for a total score of 99.

Ruby, 41 40 bytes

->x{puts k=[?\s*(r=x-1)+?+]*r,?+*r+=x,k}

Try it online!

Python 2, 52 bytes
n=input()-1
p=(' '*n+'+\n')*n
print p+'++'*n+'+\n'+p

Try it online!
A 53-byte alternative (TIO):
n=input()-1
for c in' '*n+'+'+' '*n:print c*n+'+'+c*n

R, 54 bytes
Shaving off 7 bytes thanks to @Jarko Dubbeldam:
function(n){a=matrix("",y<-n*2-1,y);a[n,]=a[,n]="x";a}

previous answer:
f=function(n){a=matrix("",n*2-1,n*2-1);a[n,]="x";a[,n]="x";a}

You don't have to name functions, so function(n){a=matrix("",n*2-1,n*2-1);a[n,]="x";a[,n]="x";a} would be 59 bytes!

Also, you can save a byte using matrix("",y<-n*2-1,y)

a[n,]=a[,n]="x" works too, saving some more bytes.

You can save another 4 bytes by using scan() and making it a program rather than a function: n=scan();a=matrix("",y<-n*2-1,y);a[n,]=a[,n]="+";a

PowerShell, 48 bytes
param($n)($x=,(" "*--$n+"+")*$n);'+'*(1+2*$n);$x

Try it online!
Takes input $n. Starts by constructing a string of --$n spaces, concatenated with +. That's converted into an array using the comma operator, (newly-decremented) $n times. That array is stored in $x and encapsulated in parens to place a copy on the pipeline.
We then do the middle section, which is + string multiplied out the appropriate number of times. That's left on the pipeline. Finally, we put $x on the pipeline again.
Those are all left on the pipeline at program completion, and the implicit Write-Output inserts a newline between elements.

Python 2, 65 bytes
lambda n:('g+\n'*~-n+'+'*~-(2*n)+'\ng+'*~-n).replace('g',' '*~-n)

Try it Online!

CJam, 23 bytes
ri_(S*'++a\2*(*_z..e>N*

Try it online!
Explanation
This feels a bit suboptimal, but the idea is to superimpose the following two grids:
  +
  +
  +
  +
  +

+++++

Which gives the desired result.
ri    e# Read input and convert to integer N.
_(    e# Duplicate and decrement.
S*    e# Get a string of N-1 spaces (indentation of the vertical bar).
'++   e# Append a + (the vertical bar).
a     e# Wrap the line in an array.
\2*(  e# Swap with the other copy of N and compute 2N-1.
*     e# Repeat the line that many times.
_z    e# Duplicate the grid and transpose it.
..e>  e# Pairwise maximum between the two grids. This superimposes them.
N*    e# Join with linefeeds.

Lua 113, 90 bytes

r,w,p=string.rep,io.read(),io.write;s=r(' ',w-1)p(r(s..'+'..'\n',w-1))p(r('+',w*2-1)..'\n')p(r(s..'+'..'\n',w-1))

r,w=string.rep,io.read()d=w*2-1;for a=1,d do print(a~=w and r(' ',w-1)..'+'or r('+',d))end

Python 2, 60,56 bytes
n=input()-1
z=(' '*n+'+\n')*n
print z+'+'*(2*n+1)+'\n'+z

Try it online!

-4 bytes - thanks to math junkie!

Save 4 bytes like this: TIO

Perl 5, 45 bytes
44 bytes of code + -p flag.
$_=join"+
",@%=($"x--$_)x$_,"+"x($_*2),@%,""

Try it online!

Some similar (but still different) approaches:
48 bytes (47+-p):
$_=join"+"x($_*2-1).$/,(~~($"x--$_."+\n")x$_)x2

50 bytes (49+-n):
$,="+"x($_*2-1).$/;print+(~~($"x--$_."+\n")x$_)x2

05AB1E, 15 14 12 bytes
F'+}¹·<×)û.c

Try it online!
-2 thanks to Emigna.

You could do F'+}¹·<×)û.c for 12.

Your try it online link is bad - it doesn't link to the current revision of the post so it shows "bad output" that doesn't match the test cases above.

@ThomasWard: Good catch! I corrected the link.

F'+}¹×û)û.c for 11 bytes.

CJam, 17
ri(S*_]'+*_ffe>N*

Try it online
Explanation:
ri(      read n, convert to int and decrement
S*       make a string of n-1 spaces
_]       duplicate it and put the 2 strings in an array
'+*_     join the strings with a '+' and duplicate the result
ffe>     for each pair of characters from the 2 (identical) strings,
          get the larger character (results in a matrix)
N*       join the rows with newlines

Octave, 36 31 bytes
Inspired by @LuisMendo 's MATL answer.
@(n)' +'(((a=1:n*2-1==n)|a')+1)

Try it online!
Previous answer:
@(n)' +'(1+((a=padarray(1,n-1))|a'))

Try it online!

V, 19 18 15 bytes
Golfed 3 bytes thanks to @nmjcman101 by using . and Ò+
Àé r+À«Ä.MgJxÒ+

Try it online!

Try it online!

JS (ES6), 88 74 73 bytes
x=>(x--,y=y=>(" ".repeat(x)+`+
`).repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``)

Probably can be golfed more.

Snippetify(x=>(x--,y=y=>(" ".repeat(x)+`+
`).repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``))

<input type = "number">

I'm not entirely sure, but I think you can replace the "\n" with two backticks and a literal newline between them

Only seeing this solution now, you beat me by a few minutes. What's the etiquette around here on similar solutions in the same language that are posted within a small window of time?

PHP, 68 Bytes
for(;$i<$c=-1+2*$m=$argn;)echo"\n".str_pad("+",$c," +"[$m==++$i],2);

83 Bytes
for(;$i<($c=($n=$argn)*2-1)**2;)echo$i%$c?"":"\n".!++$k," +"[$k==$n|$i++%$c==$n-1];

You can save a few bytes by using $m=$argn and pre-incrementing $i rather than post incrementing it. you can also save a byte by moving the $m assignment ot the end and dropping the brackets.

@user59178 I could not understand what you exactly mean

for(;$i<$c=-1+2*$m=$argn;)echo"\n".str_pad("+",$c," +"[$m==++$i],2);

while(++$y<2*$n=$argn)echo"\n",str_pad("+",$n*2-1," +"[$y==$n],2); 66 bytes (and save one more with a physical linebreak)

JavaScript (ES6), 60 bytes

f=
n=>(r=([s,t])=>(s=s.repeat(n-1))+t+s+`
`)([r(` +`),r(`++`)])
<input type=number min=1 oninput=o.textContent=f(this.value)>

Outputs two trailing newlines. Alternative formulation, also 60 bytes:
n=>(r=a=>(s=a[0].repeat(n-1))+a[1]+s+`
`)([r(` +`),r(`++`)])

Batch, 108 bytes
@set p=+
@set l=@for /l %%i in (2,1,%1)do @
%l%call set p= %%p%%
%l%echo %p%
@echo %p: =+%
%l%echo %p%

Note: Line 3 ends in a space.

MUMPS, 48 50 53 bytes
F i=1-n:1:n-1 W ! F j=1-n:1:n-1 W $C(i&j*-11+43)

Welcome to PPCG!

PowerShell, 48
Doesn't seem to get shorter than that (and pretty much the same approach as the other solution):
($a=,(' '*($n="$args"-1)+'+')*$n)
'+'+'++'*$n
$a

or
($a=(' '*($n="$args"-1)+'+
')*$n)+'++'*$n+"+
$a"

REXX, 81 bytes
arg a
b=a*2-1
do i=1 to b
  if i=a then say copies('+',b)
  else say right('+',a)
  end

Brain-Flak, 216 + 1 = 217 bytes
+1 bytes from the -A flag
([{}]())(()()){<>(((((()()()()()){})){}()){}())<>(({}[()])<({}<(({})){({}()<(({}<<>(({}<(({})<>)>)<>)<>>)<{({}()<(((((()()){}){}){}){})>)}{}>)>)}{}>){(<{}(({}<<>({}<({}<>)>)>)<(({}){}){({}()<(({}))>)}{}>)>)}{}>)}{}{}

Try it online!
Explanation to come

Japt, 30 26 24 bytes
23 bytes of code, +1 for the -R flag.
Saved 4 bytes thanks to @ETHproductions!
V=U+´UVÇ¦U?SpU +'+:'+pV

Try it online!

I think you can save a bunch by doing V=U+´U at the beginning and removing all those pesky -1s ;-)

@ETHproductions Great idea, thanks! I saved another byte by using Ç

And another byte by switching to ¦

GolfScript, 27 bytes
~.(." "*"+"n++*.@2*("+"*n+\

Try it online!
Explanation and Example Execution:
                              # Input: 3
~.(.                          # Eval input, duplicate twice, decrement duplicates
                              # Stack: 3 2 2
    " "*                      # That many spaces
                              # Stack: 3 2 "  "
        "+"n++                # Followed by a + and a newline
                              # Stack: 3 2 "  +\n"
              *.              # Create n of those strings and duplicate it
                              # Stack: 3 "  +\n  +\n" "  +\n  +\n"
                @2*(          # Pull bottom to top, double it, decrement
                              # Stack: "  +\n  +\n" "  +\n  +\n" 5
                    "+"*n+    # That many +s followed by a newline
                              # Stack: "  +\n  +\n" "  +\n  +\n" "+++++\n"
                          \   # Swap last 2 items and implicityly print
                              # Stack: "  +\n  +\n" "+++++\n" "  +\n  +\n"

Vim, 36 bytes
<C-x>D@-i <esc>Y@-pVGy:1s/ /+/g
P:%s/.*/&+&

The byte-count includes a trailing newline. Try it online!
Explanation
<C-x>D

Decrement the input number n and delete it. The deleted text is stored in the "small deletion" register "-.
@-i <esc>

Insert a space "- times.
Y@-p

Yank that line, and then paste it "- times. We now have n lines of n-1 spaces each, with the cursor at the beginning of line 2.
VGy

Select all lines till the end of the file (i.e. n-1 lines, all but the first one) and yank them.
:1s/ /+/g

On line 1, replace each space with a plus sign. This command leaves the cursor on line 1.
P

Paste the previously yanked lines above the current line. We now have n-1 lines of spaces, one line of plus signs, and n-1 more lines of spaces.
:%s/.*/&+&

Replace each line with itself followed by a plus sign followed by itself again.

J, 21 bytes
' +'{~+./~(0=}.,])i.n

Pyke, 14 bytes
t.\+s FQt*\++s

Try it online!

8086 machine code, 57 bytes
00000000  a0 82 00 24 cf 98 48 89  c1 b4 4c e3 20 bf 39 01  |...$..H...L. .9.|
00000010  57 51 5a 52 51 b0 20 89  d1 f3 aa b8 2b 0a ab 59  |WQZRQ. .....+..Y|
00000020  e2 f2 c6 05 24 59 01 c9  b4 09 5a cd 21 41 b0 2b  |....$Y....Z.!A.+|
00000030  cd 29 e2 fa 4a cd 21 c3  0a                       |.)..J.!..|
00000039

Takes a number (one digit...) as command line argument.
How it works:
            |   use16
a0 82 00    |       mov al, byte [0x82]
24 cf       |       and al, not 0x30
98          |       cbw
48          |       dec ax
89 c1       |       mov cx, ax
b4 4c       |       mov ah, 0x4c
e3 20       |       jcxz a
bf 39 01    |       mov di, s+1
57          |       push di
51          |       push cx
5a          |       pop dx
52          |       push dx
51          |   @@: push cx
b0 20       |       mov al, ' '
89 d1       |       mov cx, dx
f3 aa       |       rep stosb
b8 2b 0a    |       mov ax, 0x0a2b
ab          |       stosw
59          |       pop cx
e2 f2       |       loop @b
c6 05 24    |       mov byte [di], 0x24
59          |       pop cx
01 c9       |       add cx, cx
b4 09       |       mov ah, 0x09
5a          |       pop dx
cd 21       |       int 0x21
41          |   a:  inc cx
b0 2b       |   @@: mov al, '+'
cd 29       |       int 0x29
e2 fa       |       loop @b
4a          |       dec dx
cd 21       |       int 0x21
c3          |       ret
0a          |   s db 0x0a

Rust, 89 bytes
|n|{for i in 1..2*n{if i==n{println!("{:+^1$}","",2*n-1)}else{println!("{:>1$}","+",n)}}}

05AB1E, 5 bytes
'+90Λ

Try it online!

4 bytes (and non-competing is no longer a thing)

J, 17 bytes
Anonymous tacit prefix function
' +'{~0=*/~@i:@<:

Try it online!
For example for 3:
<: decrement; 2
i: steps; [-2,-1,0,1,2]
*/~ times table; [[4,2,0,-2,-4],[2,1,0,-1,-2],[0,0,0,0,0],[-2,-1,0,1,2],[-4,-2,0,2,4]]
0= indicate where zero; [[0,0,1,0,0],[0,0,1,0,0],[1,1,1,1,1],[0,0,1,0,0],[0,0,1,0,0]]
" +"{~ use that to index into " +"; ["  +  ","  +  ","+++++","  +  ","  +  "]

Keg, 39 37 bytes
;(:|:⑬*,\+,
,):⑨⑵;`+`*,
,(:|:⑬*,\+,
,

-2 bytes using built-ins
Try it online!
This attempt prints the isolated +s first, then the big row of +s then the final isolated +s.

Wren, 67 bytes
Fn.new{|n|(1...2*n).map{|i|i==n?"+"*(n+~-n):" "*~-n+"+"}.join("
")}

Try it online!
Explanation
Fn.new{|n|                                                      // New anonymous function with parameter n
          (1...2*n).map{|i|                                     // Foreach 1 -> 2n-1:
                           i==n?                                // If i equals n:
                                "+"*(n+~-n)                     // Return "+" 2n-1 times
                                           :" "*~-n             // Otherwise return space n-1 times
                                                   +"+"         // Add a trailing "+"
                                                       }.join("
")}                                                             // Join with newline

PowerShell, 47 bytes
param($n)($x=,(' '*--$n+'+')*$n)
'+'+'++'*$n
$x

Try it online!
This one is shorter than 48 bytes ¯\_(ツ)_/¯

Vyxal C, 12 bytes
\+*÷:?d›*Wøm

Try it Online!
-2 thanks to @astonearachnid.
-1 thanks to lyxal.

13 bytes: Try it Online!

12 bytes

Regenerate -a, 38 bytes
(({2,$~1} |\+|{2,$~1} )$2{$~1-2}!)\+$1

Takes input as a command-line argument. Try it here!
Explanation
Here, we're going to (ab)use Regenerate's backtracking algorithm. The regex describes several possibilities for a single line, and the -a flag instructs Regenerate to output all possible matches. I'm going to start with a slightly different version that doesn't work for input \$n=1\$, and then discuss how to deal with that corner case afterwards.
Space is represented by underscore for better visibility.
(({2,$~1} |\+|{2,$~1} )$2{$~1-2})\+$1
(                               )      Group 1: the part before the central + character:
                                       either n-1 spaces or n-1 + characters
 (                    )                 Group 2: which character to use
                                         Option 1:
  {2,$~1}                                 Repeat empty string between 2 and n times
                                          (this causes the backtracker to try n-1 different
                                          options, all of them equal to empty string)
         _                                followed by space
          |                              Option 2:
           \+                             + character
             |                           Option 3:
              {2,$~1}_                    Same deal as option 1
                       $2               Group 2 again...
                         {$~1-2}        ... repeated n-2 times, for a total of n-1
                                 \+    The central + character
                                   $1  followed by group 1 again

When backtracking over group 2, Regenerate will try space \$n-1\$ times, then +, then space another \$n-1\$ times. So the list of all possible matches will be \$n-1\$ lines of spaces with a + in the middle, one line of + characters with a + in the middle, and \$n-1\$ more lines of spaces with a + in the middle--exactly the output we want.
There is a problem with \$n=1\$, however. We want group 1 to match the empty string, so that the only possible match for the full regex is +. However, with input of \$1\$, group 1 fails to match. The culprit is $2{$~1-2}, "repeat group 2's contents \$n-2\$ times." It's not possible to repeat something \$-1\$ times, so the whole group fails.
We can get around this failure by providing empty string as another alternative inside group 1. However, using | here raises another issue: we don't want the empty string to be tried if the first alternative succeeded, only if it failed. (Since we're asking for all possible matches, we would get a stray + at the end of the output for \$n>1\$.)
The solution is to use !, a greedy version of |. If its left side matches at all, it takes the left side's match(es) and never tries the right side. It only tries the right side if its left side fails entirely. Thus, our final solution is:
((...)$2{$~1-2}!)\+$1
(               )      Group 1: the part before the central + character
 (...)                  Group 2: same options as before
      $2{$~1-2}         Repeat group 2 again n-2 times
               !        Or, iff that fails because n-2 < 0...
                        Empty string
                 \+    The central + character
                   $1  followed by group 1 again

Charcoal, 26 25 bytes
ＮηＡ⁻η¹η××η²+Ｐ+Ｍη↙Ｇ↑⁺¹×η²+

Try it online!
Explanation:
Ｎη                   // Take the size as input.
Ａ⁻η¹η                // Set η to η-1.
××η²+                // Print '+' η*2 times.
Ｐ+                   // Print '+'
Ｍη↙                 // Move η steps down to the left.
Ｇ↑⁺¹×η²+            // Print '+' η*2+1 times upwards from current position.

Common Lisp, SBCL, 69 bytes
(format t"~@?~@?~@?+
~@*~@?""~v@{~:*~v@t+
~}"(1-(read))"~1@*~v@{+~}")

Explanation
format        ;printing function
~@?           ;execute current argument as format string
~@*           ;go to first argument in list, to reuse "~v@{~:*~v@t+
              ;~}"
~v@{~}        ;loop n times, where n is current argument
~:*           ;go back one argument - to reuse (1-(read))
~v@t          ;add n spaces where n is current argument
              ;if we were sure that we start on new line we could
              ;use ~vt, which moves to nth column
(1-(read))    ;take input and subtract 1 from it
~1@*          ;move to second argument, to reuse (1-(read))

"~@?~@?~@?+   ;main format string - calls others
~@*~@?"       ;prints one "+" and one newline
"~v@{~:*~v@t+ ;outputting input-1 lines of "+"s
~}"           ;preceded by correct amount of spaces
"~1@*~v@{+~}" ;outputting input-1 pluses. We do it two times
              ;and then add one + at the end. This way there
              ;is no need for argument like: (1-(* 2 INPUT))
              ;which would make me need a variable keeping INPUT

Ideas for improvement are welcomed.

Pyth, 24 bytes
+J*+++K*dQ\+Kb/Q2*\+hyQJ

Try it online!

Perl 5, 43 + 1 (-n) = 44 bytes
$,="+
";say@q=($"x--$_)x$_,'+'x(2*$_),@q,''

Try it online!
Independently came up with pretty much the same method as @Dada, but got it down by 1 byte.

Excel, 86 bytes
=REPT(REPT(" ",A1-1)&"+
",A1-1)&REPT("+",2*A1-1)&"
"&REPT(REPT(" ",A1-1)&"+
",A1-1)

Japt -R, 12 bytes
Look, Ma, no +!
çÄ ê
¬hNÉU û

Try it

APL (NARS2000), 25 characters:
{' +'[1+∨/¨⍵=∘.,⍨⍳⍵+⍵-1]}

APL (NARS2000), 26 characters:
{' +'[1+∨/¨⍵=∘.,⍨⍳¯1+2×⍵]}

Examples:
      {' +'[1+∨/¨⍵=∘.,⍨⍳⍵+⍵-1]} 1
+
      {' +'[1+∨/¨⍵=∘.,⍨⍳⍵+⍵-1]} 2
 +
+++
 +
      {' +'[1+∨/¨⍵=∘.,⍨⍳⍵+⍵-1]} 3
  +
  +
+++++
  +
  +
      {' +'[1+∨/¨⍵=∘.,⍨⍳⍵+⍵-1]} 4
   +
   +
   +
+++++++
   +
   +
   +

Rationale:
Take n = 4 as example. Objective is to generate an integer matrix as below:
1 1 1 2 1 1 1
1 1 1 2 1 1 1
1 1 1 2 1 1 1
2 2 2 2 2 2 2
1 1 1 2 1 1 1
1 1 1 2 1 1 1
1 1 1 2 1 1 1

Expression ⍵=∘.,⍨⍳⍵+⍵-1, when given ⍵ = 4, generates matrix of 2-tuple from integer vector 1..7:
 0 0  0 0  0 0  0 1  0 0  0 0  0 0
 0 0  0 0  0 0  0 1  0 0  0 0  0 0
 0 0  0 0  0 0  0 1  0 0  0 0  0 0
 1 0  1 0  1 0  1 1  1 0  1 0  1 0
 0 0  0 0  0 0  0 1  0 0  0 0  0 0
 0 0  0 0  0 0  0 1  0 0  0 0  0 0
 0 0  0 0  0 0  0 1  0 0  0 0  0 0

Each cell is reduced by logical-or ∨/¨ to give boolean matrix:
0 0 0 1 0 0 0
0 0 0 1 0 0 0
0 0 0 1 0 0 0
1 1 1 1 1 1 1
0 0 0 1 0 0 0
0 0 0 1 0 0 0
0 0 0 1 0 0 0

Add 1 to this matrix and we have the desired array-indexing matrix.

Batch 97 bytes
requires windows 10 with virtual terminal support
Set x=%~1&cls&@Set/a c=x*2-1
@For /L %%i in (1 1 %c%)Do @Echo(ESC[%%i;%x%H+ESC[%x%;%%iH+ESC[%x%BESC[1G

ESC is the ANSI escape character, which doesn't paste well but can be copied from the raw paste data here.
Or it can be generated by opening the command prompt and typing >"%TEMP%\escape.chr" Echo(ALT+027 then pressing ENTER, or output using a for loop with Echo off:
(For /F "skip=4 DELIMS=" %a in ('Echo(prompt $E^|cmd')Do Echo(%a) >"%TEMP%\escape.chr"

How:
Iterates over the width of the string c and outputs c+ along the the x (y and x) intersection using virtual terminal sequences to move the cursor to the relevant coordinates.

Canvas, 8 7 bytes
+×：⤢ｎ！┼

Try it here!
-1 byte from hakr14.

You can replace ；+＊ with ：⤢ to save a byte. Also, how did I not know about ｎ?

@hakr14 I realized n's existence after a long time as well :) Talking with dzaima helps

Regenerate, 38 bytes
(( {$~1-1}\+\n){$~1-1})\+{$~1*2-1}\n$1

Takes input as a command-line argument. Try it here!
Explanation
Space is represented by underscore for better visibility.
(( {$~1-1}\+\n){$~1-1})\+{$~1*2-1}\n$1
(                     )                 Group 1: the section above the center line
 (            )                          Group 2: one line of that section
  _{$~1-1}                                n-1 spaces
          \+\n                            followed by + and newline
               {$~1-1}                   Repeat n-1 times
                       \+{$~1*2-1}      n*2-1 + characters
                                  \n    followed by newline
                                    $1  Contents of group 1 again

><> (Fish), 94 bytes
1-:?!/:::?v"+"o~ \
 84*o1-70.\
>.!07$&:&v!?:-1oa/
/+1 *2:~ /
 /ao~";"93p10.
<\!?:-1o"+"
 ;"+"\

Try it online! Animated Version
Explanation

The yellow loop special cases the 1 cross variant to print a + and exit.
The blue loop is the loops over each line. The green loop prints N spaces and the blue loop then prints a "+" at the end of each line.
The orange bypass calculates the length of the row which will have only + signs (2n + 1). Then it will enter the blue-purple loop.
The blue-purple loop prints the plus signs in the middle row. Once the count reaches 0 the mirror isn't skipped anymore so the pink segment is entered.
The pink segment replaces the mirror at 9,3 with a ;. This is the red highlighted semicolon in the picture. Then jumps back to the blue loop. However, this time instead of printing the row of + signs it will exit. (; means exit program in fish)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Wherre are the adjacent characters in the title? [3, 4]!
Title misspelled on purpose. Read more to find out why.
Your task: given a delimited string or list including the characters A,B,C,D, output the indexes of all the adjacent equal characters. Output can be multiple strings/integers on multiple lines, a list/array, or a delimited string.
All output should be in a list or string, or multiple printed lines. Each printed line, if there are multiple, should only contain 1 string or number. Trailing whatevers are okay.
Standard methods of input/output. Standard loopholes apply.
For example, the input 'ABCDDCBA' should output 3,4 or 4,5, depending on whether it is 0- to 1- indexed, because those numbers are the indexes of D and the D next to it.
Test cases:
Test cases have input given as a single string, and output as a ,-delimited string. Outputs are 0-indexed, add 1 to every outputted item to get it to be 1-indexed.
Input: 'ABCDCABCD'
Output: ''

Input: 'AABBCCDD'
Output: '0,1,2,3,4,5,6,7'

Input: 'ABCDDDCBA'
Output: '3,4,5'

Input: 'ABBCDD'
Output: '1,2,4,5'

This is code-golf, so shortest code wins!

Can we have a trailing delimiter in the output?

@BasicSunset  Sure

Must output indices be in order?

@LuisMendo No, they do not.

"If you chose to output multiple strings/integers, each must only have one number in them" - so, specifically, is an output of a list of lists separating the runs not acceptable (for example [[0,1],[2,3],[4,5],[6,7]] for your example 2), or is that OK since there is a single containing list?

@JonathanAllan That is okay because it outputs only one list.

Can indices of consecutive characters appear multiple times? E.g. for the third test case, is 3,4,4,5 valid as well?

@Luke Yes, that is okay.

Can you add a test case that doesn't have symmetrical matches? E.g. AABBCD -> 1,2,3,4

@fəˈnɛtɪk Sorry, but this is not allowed.

Can it output as a list

@fəˈnɛtɪk "Output can be multiple strings/integers on multiple lines, a list/array, or a delimited string." Yes, it can output as a list.

Is it OK for the resulting list to contain empty elements?

@raznagul Sorry, but that is not okay.

MATL, 8 7 bytes
d~ftQvu

Output is 1-based.
Try it online!
Explanation with example
Consider input 'ABCDDDCBA'.
d     % Implicitly input a string. Consecutive differences
      % STACK: [1  1  1  0  0 -1 -1 -1]
~     % Negate. Each character that equals the next gives true
      % STACK: [0 0 0 1 1 0 0 0]
f     % Find: (1-based) indices of true elements
      % STACK: [4 5]
tQ    % Duplicate, add 1 element-wise
      % STACK: [4 5], [5 6]
v     % Concatenate vertically
      % STACK: [4 5; 5 6]
u     % Unique (remove duplicates). This doesn't automatically sort, but the
      % output will be sorted because the input, read in column-major order, is
      % Implicitly display
      % STACK: [4; 5; 6]

Retina, 33 29 23 bytes
Saved 6 bytes thanks to Martin Ender
T`L`:`(.)\1+
:
$.`¶
T`L

Outputs a linefeed-separated list of indices.
Try it online!
Explanation
T`L`:`(.)\1+

Transliterate runs of the same character into colons, to mark positions where there are duplicate characters.
:
$.`¶

Then replace each colon with the length of the text before it, followed by a linefeed.
T`L

Finally, delete any remaining letters.

Jelly, 7 bytes
JṁŒgḊÐf

1-based; returns a list of lists of the runs of indexes as allowed by the OP.
Try it online!
How?
JṁŒgḊÐf - Main link: char-list s       e.g. 'DCCABBBACCCD' (which is a python interpreted input of ['D','C','C','A','B','B','B','A','C','C','C','D'])
J       - range(length(s))                  [1,2,3,4,5,6,7,8,9,10,11,12]
  Œg    - group-runs(s)                     [['D'],['C','C'],['A'],['B','B','B'],['A'],['C','C','C'],['D']]
 ṁ      - mould left like right             [[1],[2,3],[4],[5,6,7],[8],[9,10,11],[12]]
     Ðf - filter keep items that would be truthy (empty is not truthy) after applying:
    Ḋ   -     dequeue (x[1:])               [    [2,3],    [5,6,7],    [9,10,11]     ]

ṁ - Things I wish 05AB1E could do for 500, please.

I feel more and more like this language is kind-of like cheating here. :D

@ComradeSparklePony why the undo of the accept check?

Brain-Flak, 57 46 bytes
{({}[({})]<(([]<>)[()])>){(<{}{}{}>)}{}<>}<>

Includes +2 for -ar
Uses 0-based indexing.
Try it online!
# While true
{

  # Subtract the second value on the stack from the first
  ({}[({})]

  # Push the height of this stack (the main stack) on the other stack
  <(([]<>)

  # Push the height of the main stack - 1
  [()])>

  # Push the difference that we calculated a second ago
  )

  # If they weren't the same character
  {

    # Pop the difference and the two stack heights
    (<{}{}{}>)

  # End if
  }

  # Pop the difference (or the 0 to get out of the if)
  {}

# Switch back to the main stack and end while
<>}

# Switch to the stack with the indexes and implicitly print
<>

Brachylog, 19 bytes
l⟦k:?z{sĊtᵐ=∧Ċ∋h}ᶠd

Try it online!
Explanation
Brachylog is usually terrible with indexes, which again shows here.
If false. is an acceptable output in cases where there are no adjacent characters, then this would be 1 byte less by replacing ᶠd by ᵘ.
l⟦k                      The list [0, …, length(Input) - 1]
   :?z                   Zip the Input with this list
      {         }ᶠd      Find with no duplicates:
            ∧Ċ∋h           The heads of each element of Ċ = [A, B] (i.e. the indexes)…
        Ċtᵐ=               …where the tails of both A and B are equal (i.e. the letters)…
       sĊ                  …and where Ċ = [A, B] is a substring of the Input

Brain-Flak, 69, 59, 56 bytes
{({}[({})]<(())>){((<{}{}>))}{}{([{}]([]<>))(<>)}{}}<>

Try it online!
+2 bytes for the -ar flags which enables ASCII input and reverses the stack.
Uses 0-based indexing. Saved 10 bytes by reducing my push-pop redundancy. Saved another 4 bytes by switching from 1 to 0-based indexing.
This is pretty much the only string based challenge that brain-flak is good at. That's because brain-flak is great at comparing consecutive characters, even though it's horrendous at string processing in general. Here is readable version of the code with comments to explain how it works:
#While True
{

    #Determine if top two are equal
    ({}[({})]<(())>){((<{}{}>))}{}

    #If so
    {

        #Pop the one, and negate it's value (giving us -1)
        ([{}]

        #Push stack height over
        ([]<>)

        #Then push stack height plus the negated pop (-1)
        )

        #Push a zero back onto the main stack
        (<>)

    #Endwhile
    }

    #Pop the zero
    {}

#Endwhile
}

#Toggle back, implicitly display
<>

A little friendly competition :)

@riley fixed! (And still one byte shorter :P)

I always forget about -r. That brings me down to 46.

Mathematica, 32 bytes
Union@@StringPosition[#,x_~~x_]&

Pure function which returns the 1-indexed positions of characters adjacent to an identical character.
Explanation:
StringPosition["string","sub"] gives a list of the starting and ending character positions at which "sub" appears as a substring of "string". x_~~x_ is a StringExpression which matches two adjacent, identical characters. For example, StringPosition["ABCDDDCBA",x_~~x_] gives {{4, 5}, {5, 6}}. Applying Union joins the lists, sorts, and deletes duplicates.

Cubix, 37 32 31 29 28 bytes
Thanks to ETHProductions for pointing me in the direction of a three-byte saving
$uO@(;Usoi?-!w>;.....S_o\;#O

Try it here! Note that the output indices are 1-based and not in ascending order.
Expanded:
      $ u O
      @ ) ;
      U s o
i ? - ! w > ; . . . . .
S _ o \ ; # O . . . . .
. . . . . . . . . . . .
      . . .
      . . .
      . . .

Explanation
This works by reading the input character by character. To compare two characters, we simply subtract the their character codes, and if the result is 0, we print the current length of the stack, a space, the current length of the stack - 1 and another space. Then we clean up the stack a bit, and we start with the read loop again. If the end of the input string is reached, the program stops.

Hmm, if you can keep the stack fairly clean, you may be able to use # to get the length of the stack when you need it. (Also, LOL'ed at the ;_; in the code ;) )

A basic example (probably not fully golfed); https://ethproductions.github.io/cubix/?code=Li53QC47Li5vaT8tIXU7Li4uLi4uT18oIztcTylzb1M=&input=QUJDREREQ0JB&speed=20 (Note: it's 1-indexed, not 0-indexed)

Thanks for the reminder. I golfed one byte of your version and added that. I might be able to get anoter byte or two off...

Idea: what if you did !$w instead of !w and moved part of the fifth row logic to the fourth row? (Can't try right now because I'm heading out the door)

I also thought of that, but I don't think it will save many bytes. I'll try it though.

Octave, 35 bytes
@(s)unique([x=find(~diff(+s)),x+1])

Try it online!
Similar to my MATL answer. Here unique automatically sorts . The input to diff must be converted to double, which is done by the unary +.

C#, 115 bytes

Golfed
i=>{var o="";for(int x=1,l=i.Length;x<=l;x++)o+=(x<l&&i[x]==i[x-1])||(x>1&&i[x-1]==i[x-2])?(x-1)+" ":"";return o;};

Ungolfed
i => {
   var o = "";

   for( int x = 1, l = i.Length; x <= l; x++ )
      o += ( x < l && i[ x ] == i[ x - 1 ] ) || ( x > 1 && i[ x - 1 ] == i[ x - 2 ] )
         ? ( x - 1 ) + " "
         : "";

   return o;
};

Ungolfed readable
i => {
   // List of positions
   var o = "";

   // Cycle through the string
   for( int x = 1, l = i.Length; x <= l; x++ )
      // Check if 'x' is below the string length
      //    and if the current and previous char are the same...
      //    ... or if 'x' is beyong the string length
      //    and the 2 previous chars are the same.
      o += ( x < l && i[ x ] == i[ x - 1 ] ) || ( x > 1 && i[ x - 1 ] == i[ x - 2 ] )

         // If true, add the index to the list of positions...
         ? ( x - 1 ) + " "

         // ...otherwise add nothing
         : "";

   // Return the list of positions.
   return o;
};

Full code
using System;
using System.Collections.Generic;

namespace Namespace {
   class Program {
      static void Main( String[] args ) {
         Func<String, String> f = i => {
            // List of positions
            var o = "";

            // Cycle through the string
            for( int x = 1, l = i.Length; x <= l; x++ )
               // Check if 'x' is below the string length
               //    and if the current and previous char are the same...
               //    ... or if 'x' is beyong the string length
               //    and the 2 previous chars are the same.
               o += ( x < l && i[ x ] == i[ x - 1 ] ) || ( x > 1 && i[ x - 1 ] == i[ x - 2 ] )

                  // If true, add the index to the list of positions...
                  ? ( x - 1 ) + " "

                  // ...otherwise add nothing
                  : "";

            // Return the list of positions.
            return o;
         };

         List<String>
            testCases = new List<String>() {
               "ABCDCABCD",
               "AABBCCDD",
               "ABCDDDCBA",
               "",
               "A",
               "AA",
               "AAA",
         };

         foreach( String testCase in testCases ) {
            Console.WriteLine( $"{testCase}\n{f( testCase )}\n" );
         }

         Console.ReadLine();
      }
   }
}

Releases

v1.0 - 115 bytes - Initial solution.

Notes
Nothing to add

C, 75 bytes
i;f(char*s){for(i=0;*s;++s,++i)if(s[1]==*s|(i&&s[-1]==*s))printf("%d ",i);}

Uses spaces as delimiters. (A trailing comma doesn't look too good.)
Try it online!

JavaScript, 52 bytes
Thanks @Neil for golfing off 1 byte
x=>x.map((a,i)=>a==x[++i-2]|a==x[i]&&i).filter(a=>a)

Receives input as a 0-indexed array of characters
Returns output as a 1-indexed array
Explanation
x.map()

For each character in the string
(a,i)=>(a==x[++i-2]|a==x[i])*i

If it is equal to the previous character or the next character, return the index+1 otherwise do not return (leaves undefined in the array)
.filter(a=>a)

Remove all undefined elements from the resulting array
Try it online!

Would &&i save a byte over (...)*i?

@Neil && is faster than |, which would result in it always returning i

0|0&&6 is 0, 1|0&&6 is 6, 0|1&&6 is 6, 1|1&&6 is 6. Isn't that what you want?

I think I was thinking I still had || instead of |

Ah yes, that would explain it.

Jelly, 8 bytes
=2\T’œ|$

Try it online!

Hmm, exactly the same algorithm I tried, though mine was slightly longer: Ṗ=ḊTµ2Ḷ+€

k, 18 bytes
{?,/-1 0+/:&:=':x}

Examples:
k){?,/-1 0+/:&:=':x}"AABCDDDCBAA"
0 1 4 5 6 9 10
k){?,/-1 0+/:&:=':x}"ABCDCBA"
()

Translation to q is easier to understand:
{distinct raze -1 0+/:where not differ x}

This was my initial solution too! :D

QBIC, 42 bytes
;[2,_lA||~mid$(A,a-1,1)=mid$(A,a,1)|?a-1,a

Sample output:
Command line: AADCDBBD
 1             2
 6             7

Explanation:
;               Get A$ from the cmd line
[2,    |        FOR a% = 2 TO
   _lA|              the length of A$
~mid$(A,a-1,1)  IF the character at index a%
=mid$(A,a,1)    equals the char at index a%-1
|               THEN
?a-1,a          PRINT both indexes, tab-separated
                Any further doubles are printed on a separate line
                The IF and FOR are closed implicitly

EDIT: QBIC now has Substring! This challenge can now be solved in 32 bytes:
;[2,_lA||~_sA,a-1|=_sA,a||?a-1,a

Where:
_s      This is the substring function; it takes 1, 2 or 3 arguments.
        Arguments are comma-seperated, the list is delimited with |
        In this answer we see Substring take 2 arguments:
  A,    The string to take from
    a|  Starting position (note:uppercase represents strings, lowercase is for nums)
        Any omitted argument (in this case 'length to take') is set to 1.

Python 2, 55 54 bytes
m=j=0
for i in input():
 if m==i:print~-j,j,
 j+=1;m=i

Try it Online!
Outputs indices separated by spaces (note that this displays some indices twice as allowed by OP)

C#, 89 Bytes
using System.Linq;s=>string.Join("",s.Skip(1).Select((a,i)=>a==s[i]?i+" "+(i+1)+" ":""));

If there are three or more characters in a row the indexes are repeated. Which @Comrade SparklePony allowed in the comments.
Ungolfed full program:
using System;
using System.Collections.Generic;
using System.Linq;

namespace Namespace
{
    class Class1
    {
        static void Main(string[] args)
        {
            Func<string, string> f2 =
                s => string.Join("" ,         //Combine the results into one string
                s.Skip(1)                     //Start with the second element
                .Select(
                    (a, i) =>                 // 'a' is the current element, 'i' is the index of the element in the result of 'Skip'
                    a == s[i] ?               // therefore 's[i]' is the previous element; compare it with the current one
                    i + " " + (i + 1) + " " : //If true, return the indexes
                    ""                        //Otherwise an empty string
                ));

            var tests = new string [] {
               "ABCDCABCD",
               "AABBCCDD",
               "ABCDDDCBA",
               "ABBCDD"
            };

            foreach (var test in tests)
            {
                Console.WriteLine(test);
                Console.WriteLine(string.Join("", f2(test)));
                Console.WriteLine();
            }

            Console.ReadLine();
        }
    }
}

Go, 116 bytes
func f(s string)map[int]int{L,l:=make(map[int]int),'0'
for i,r:=range s{if r==l{L[i-1]=i;L[i]=i}else{l=r}}
return L}

Attempt This Online!
Returns a map where the keys are the 0-based indexes of adjacent characters.
Go, 141 bytes
func f(s string)(O[]int){L,l:=make(map[int]int),'0'
for i,r:=range s{if r==l{L[i-1]=i;L[i]=i}else{l=r}}
for k:=range L{O=append(O,k)}
return}

Attempt This Online!
Returns a slice that is the 0-based indexes of the adjacent characters.

k, 14 bytes
This is a function, it takes in a string, and returns a list of indices.
&{x|1_x,0}@=':

Explanation:
           =': /compare each letter to the previous, return binary list
 {       }@
    1_x,0      /shift left
  x|           /combine shifted and unshifted with binary or
&              /get indices of 1s

Try it online!
How to use:
&{x|1_x,0}@=':"STRINGGOESHERE"

Perl 5, 37 bytes
35 bytes of code + pl flags.
s/(?<=(.))\1|(.)(?=\2)/print pos/ge

Try it online!
(?<=(.))\1|(.)(?=\2) will match either between two repeted characters ((?<=(.))\1), or before a character that is repeated ((.)(?=\2)).
Then, print pos prints the position of the match. (pos contains the index of the current match when used in a regex with /g modifier).

PHP, 100 Bytes
for(;$i<strlen($s=$argn);$i++)$s[$i]==$s[$i+1]||$s[$i]==$s[$i-1]&&$i?$r[$i]=+$i:0;echo join(",",$r);

Perl 6,  66  57 bytes
*.comb.rotor(2=>-1).kv.flatmap({($^a,$a+1)xx[eq] $^b[0,1]}).squish

Try it
{m:ex/[(.)<($0|(.))>$0]{make $/.from}/».ast.sort.squish}

Try it

Ruby, 51+1 = 52 bytes
Uses the -n flag.
i=0;d=[];gsub(/./){$&==$_[i+=1]?d+=[i-1,i]:0};p d&d

Try it online!

Batch, 139 bytes
@set/ps=
@set/ai=c=0
:l
@if %s:~,1%==%s:~1,1% set c=2
@if %c% gtr 0 echo %i%
@set/ai+=1,c-=1
@if not "%s:~1%"=="" set s=%s:~1%&goto l

Takes input on STDIN. Works by keeping track of how many numbers to print in the c variable, which is reset to 2 when a pair is detected. Note: At a cost of 6 bytes, could be hardened to work with most ASCII characters and not just ABCD.

Julia 1.3, 23 bytes
!x=findall(r"(.)\1+",x)

Attempt This Online!
in Julia 1.3+, there is a function that does the job for me. The output is a list of ranges, which are equivalent to lists (4:6 == [4,5,6])
+6 bytes if this format is not accepted

Japt, 10 bytes
Input as a character array, output as a 2D array.
ò¦ m£T°ÃlÉ

Try it
ò¦ m£T°ÃlÉ     :Implicit input of array U
ò              :Partition on
 ¦             :  Inequality
   m           :Map
    £          :  Map
     T°        :    Postfix increment T, initially 0
       Ã       :End map
        l      :Filter by length
         É     :  Minus 1 (0 is falsey)

PHP, 70 bytes
for(;a&$c=$argn[$i];)$i++&&$argn[$i-2]==$c||$argn[$i]==$c?print$i._:0;

takes input from STDIN; run with -R.

JavaScript (V8), 64 bytes
x=>x.replace(/(.)\1+/g,f=(s,i,p)=>print(p)+s[i=-~i]&&f(s,i,1+p))

Try it online!
Not that short but fun
JavaScript (Node.js), 45 bytes "by" fəˈnɛtɪk
x=>x.flatMap((a,i)=>a==x[++i-2]|a==x[i]?i:[])

Try it online!

><>, 48 47 bytes
0ril3(?;3[$::}@=r$:@e1.
=r{+]?\{1+}20.
}oan:{/1

Try it online!

Vyxal, 6 bytes
₌ẏĠ•~Ḣ

Try it Online!
Similar stuff to the other answers but independently derived.
Explained
₌ẏĠ•~Ḣ
₌ẏĠ    # range(0, len(input)) and group_consecutive(input)
   •   # mold the length range to the shape of the consecutive groups
    ~Ḣ # keep only lists where there's more than one item

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Draw boxes from box drawing characters
In the old DOS operating system, a number of characters were provided to draw boxes. Here is a selection of these characters and their code points:
B3 B4 BF C0 C1 C2 C3 C4 C5 D9 DA
│  ┤  ┐  └  ┴  ┬  ├  ─  ┼  ┘  ┌

You can use these characters to draw boxes like this:
┌─────────┐
│         │
└─────────┘

Boxes can be attached to each other:
        ┌───┐
        │   │
┌───┬───┤   │
│   │   │   │
│   ├───┴───┘
│   │
└───┘

or intersect each other:
┌─────┐
│     │
│  ┌──┼──┐
│  │  │  │
└──┼──┘  │
   │     │
   └─────┘

or overlap each other partially or completely:
┌─────┐
├──┐  │
│  │  │
├──┘  │
└─────┘

Challenge description
Write a program that receives a series of positive decimal integers separated by whitespace from standard input. The number of integers you receive is a multiple of four, each set of four integers x1 x2 y1 y2 is to be interpreted as the coordinates of two points x1 y1 and x2 y2 forming opposing corners of a box. You may assume that for each set of coordinates, x1 ≠ x2 and y1 ≠ y2.
The coordinate system originates in the top left corner with x coordinates progressing to the right and y coordinates progressing downwards. You can assume that no x coordinate larger than 80 and no y coordinate larger than 25 appears.
Your program shall output in either UTF-8, UTF-16, or Codepage 437 a series of whitespace, carriage returns, line feeds, and box drawing characters such that the output shows the boxes described in the input. There may be extraneous whitespace at the end of lines. You may terminate lines either with CR/LF or just LF but stick to one, stray CR characters are not allowed. You may output any number of lines filled with an arbitrary amount of whitespace at the end of the output.
Examples
The following input draws the first diagram from the question:
1 11  1 3

The second diagram is offset a little bit, the leading whitespace and empty lines must be reproduced correctly:
17 13   3  7
 9  5   5  9
 9 13   5  7

The third diagram also tests that input is parsed correctly:
1 7 1
5 4 10
3 7

The fourth diagram:
11 5 2 6
5 8 3 5

As a final test case, try this fifth diagram:
    ┌─────┬─────┐
┌───┼───┬─┼─┬───┴───┐
│   │   │ │ │       │
└───┼───┴─┼─┴───┬───┘
    └─────┴─────┘

Which looks like this:
9 21 2 4 1
13 4 2 11 5
1 5 17 11 1
2 11 17 4 5

Winning condition
This is code golf. The shortest solution in octets (bytes) wins. Standard loopholes apply, (worthless) bonus points for writing a solution that works on DOS.

Any particular reason for the restrictive input format?

@AdmBorkBork I want people to not worry about array sizes and stuff like that if they chose to write an implementation for DOS. For typical code golf DSLs, this probably doesn't matter.

I think a more flexible input will not hurt any answer, and will make the challenge less about reading/parsing the input and more about drawing the boxes.

It's a bit confusing that the offsets are not in the displayed diagrams. However, SE seems to strip leading lines containing only blanks, so it probably requires cheating with some comment line or such.

@Luke The rigid input specification makes it easier to parse the input as you have less cases to pay attention to. What would you like to make more flexible?

Well, I'd think an array or list of arrays/lists is a format that's easier in quite a few languages.

@Luke Which textual array representation is supported by all programming languages? I think decimal numbers separated by whitespace is a fairly easy format to implement. Note that you have to write a full program, not just a function.

Related.

@FUZxxl "Flexible input format" doesn't mean "you have to parse every possible way this data could be formatted" but "you may choose an input format that is convenient for you so that you can focus on the actual task at hand instead of processing the input". So languages where your format is the simplest could still use that format, but others could use whatever's more natural for their language.

Must we support negative integers as values? I have do it in my solution but I cost many of bytes. Can we assume that there is a maximum value for the coordinates. If I can hardcoded this value It will additional save Bytes. And if the input format is more uniform like 4 integers per line it can save Bytes. At the Moment the only which works is a Regex

Your final case is wrong it should be 9 21 2 4 1
13 4 2 11 5
1 5 17 11 1 5

@JörgHülsermann Thank you for being observant, fixed the issue.

@JörgHülsermann All of these questions are answered in the question. Coordinates must be positive, x coordinates are between 1 and 80 (inclusive), y coordinates are between 1 and 25 (inclusive).

@MartinEnder In this case I am not willing to change the specification.

-1 Because of the strict input format.

CJam, 129
0a80*a25*[q~]4/{:(2/:$_::-+e_534915808 6b3/\ff=C2b.+{):A;)z{_A)+\[A!A].+_A)4*+\}*;}%{~:A;_3$=@_2$=A|tt}/}/"   ┌ ─┐┬ └│├┘┴┤┼"ff=N*

Try it online
Notes:

If the boxes don't look quite right, it's possible that your browser is using a fallback font for box drawing characters.
CJam doesn't specify an encoding for source files. In UTF-8, this code has 151 bytes, but you can save it using CP437 or CP850 instead (and run it with the same encoding), then it will use 1 byte/character.

Overview:
0a80*a25* creates a matrix of 80×25 zeros
[q~]4/ reads the input, converts to numbers and splits into quadruplets
:(2/:$_::-+e_ converts an [x1 x2 y1 y2] quadruplet to [xmin xmax ymin ymax -width -height] (negative values will be corrected later)
534915808 6b3/ generates [[1 2 5] [0 2 5] [0 3 4] [0 2 4]], to be used as indices in the previous array for extracting data about the 4 sides of the current box
\ff= extracts the data for each side, e.g. [1 2 5] -> [xmax ymin -height] for the right side
C2b.+ appends 1, 1, 0, 0 respectively to the arrays for the 4 sides (right, left, bottom, top); this number indicates the direction (0=horizontal, 1=vertical)
):A;)z{_A)+\[A!A].+_A)4*+\}*; generates line pieces for a side, as [x y bitmask] triplets; each piece is a line going from the center of the cell to one of 4 directions: 1=right, 2=bottom, 4=left, 8=top; e.g. [4 2 -3 0] (a horizontal line of length 3 starting at x=4, y=2) results in [4 2 1] [5 2 4] [5 2 1] [6 2 4] [6 2 1] [7 2 4]
{~:A;_3$=@_2$=A|tt}/ bitwise-OR's all these line pieces into the matrix, resulting in bitmasks from 0..15
"   ┌ ─┐┬ └│├┘┴┤┼"ff= converts these bitmasks to the corresponding box-drawing characters
N* joins with newlines for display

PHP>=7.1, 820 Bytes
<?preg_match_all("#(\d+(\s+\d+){3})#s",$_GET[0],$t);$r=($w="array_fill")(1,25,$w(1,80," "));function u($n,$y,$x){global$r;$u=[$z=[" ","│",$c="┤","┐","└",$d="┴",$e="┬",$b="├","─","┘","┌",$a="┼"],["│",$c,$b,$a],[$c,$a],["┐",$c,$e,$a],["└",$d,$b,$a],[$d,$a],[$e,$a],[$b,$a],["─",$d,$e,$a],["┘",$c,$d,$a],["┌",$e,$b,$a],[$a]];$o=$r[$y][$x];$s=array_intersect($u[($k="array_search")($n,$z)],$u[$k($o,$z)]);$r[$y][$x]=reset($s);}foreach($t[1]as$e){[$a,$b,$c,$d]=explode(" ",preg_replace("#\s+#"," ",$e));u("┌",$h=min($c,$d),$f=min($a,$b));u("┐",$h,$g=max($a,$b));u("└",$i=max($c,$d),$f);u("┘",$i,$g);foreach(($l="array_slice")(range($f,$g),1,-1)as$x){u("─",$h,$x);u("─",$i,$x);}foreach($l(range($h,$i),1,-1)as$y){u("│",$y,$f);u("│",$y,$g);}}foreach($r as$v)echo join($v)."\n";

-6 Bytes for use "array_fill","array_search", "array_slice" without "
+19 Bytes echo ltrim(rtrim(join($v))."\n","\n"); instead of echo join($v)."\n"; to print only the necessary Chars
Online Version
Expanded
preg_match_all("#(\d+(\s+\d+){3})#s",$_GET[0],$t); # find all rects
$r=($w="array_fill")(1,25,$w(1,80," ")); # fill a empty 2 D array with spaces
function u($n,$y,$x){ # Char , Y Coordinate, X Coordinate as parameter
global$r; # result array must be global to make changes
# The following array based on Set Theory
$u=[
$z=[" ","│",$c="┤","┐","└",$d="┴",$e="┬",$b="├","─","┘","┌",$a="┼"],
["│",$c,$b,$a],
[$c,$a],
["┐",$c,$e,$a],
["└",$d,$b,$a],
[$d,$a],
[$e,$a],
[$b,$a],
["─",$d,$e,$a],
["┘",$c,$d,$a],
["┌",$e,$b,$a]
,[$a]];
$o=$r[$y][$x]; # old value for YX
$s=array_intersect($u[($k="array_search")($n,$z)],$u[$k($o,$z)]); # make the Cut quantity
$r[$y][$x]=reset($s); # Take the first value Cut quantity and set it as new value
}
foreach($t[1]as$e){ # for each rect
[$a,$b,$c,$d]=explode(" ",preg_replace("#\s+#"," ",$e)); #split the four coordinates
# next 4 rows make edges and set minimum and maximum for X an Y values
u("┌",$h=min($c,$d),$f=min($a,$b));
u("┐",$h,$g=max($a,$b));
u("└",$i=max($c,$d),$f);
u("┘",$i,$g);
foreach(($l="array_slice")(range($f,$g),1,-1)as$x){u("─",$h,$x);u("─",$i,$x);} # make the X lines
foreach($l(range($h,$i),1,-1)as$y){u("│",$y,$f);u("│",$y,$g);} # make the  Y lines
}
foreach($r as$v)echo join($v)."\n"; # Output

Order of the array Set Theory
foreach($u as $k0=>$v0)
foreach($u as $k1=>$v1)
echo "\n\n'".$z[$k0]."' + '".$z[$k1]."' = '". join("','",array_intersect($v0,$v1))."'";

Examples Set Theory all possible values
The array without the use of variables to short it
$u=[
$z=[" ","│","┤","┐","└","┴","┬","├","─","┘","┌","┼"],
["│","┤","├","┼"],
["┤","┼",],
["┐","┤","┬","┼"],
["└","┴","├","┼"],
["┴","┼"],
["┬","┼"],
["├","┼"],
["─","┴","┬","┼"],
["┘","┤","┴","┼"],
["┌","┬","├","┼"]
,["┼"]];');

If you use UNIX line endings, this is just 1234 bytes.

I get a parser error when trying to run your code in the site you linked.

@FUZxxl Yes I use the new list syntax that is only available with PHP 7.1. Please Change the PHP Version  before execute the Code

You have a bug in your code: You preprend one empty line and one empty column to the output. Note that the origin is supposed to be (1, 1) not (0, 0).

@FUZxxl Now it is 1 Indexing and the best I could save 15 % by hardcoded the start value of the result array

I give you a hint for reducing the code: What can you do if you assign the numbers 0, 3, 5, 6, 7, 9, 10, 11, 12, 13, and 15 to the characters of "  └│┌├┘─┴┐┤┬┼"?

@FUZxxl I have no idea. The only i know your list with numbers contains 11 Elements and there are 12 chars in the string

Sorry, 14 belong in there, too. Compare the bit patterns of the numbers with the shape of the box-drawing characters then observe what consequences this has for the behaviour of the overlay operator.

Haskell, 399 340 398 bytes
-59 (!) bytes thanks to Ørjan Johansen
import Data.Bits
import Data.Array
(&)=(,)
z=maximum
r x=[minimum x..z x-1]
l=map(+1).r
e(a:b:c:d:q)=[x&y&n|(n,(f,g))<-zip[0..][id&l,id&r,l&id,r&id],x<-f[a,b],y<-g[c,d]]++e q;e[]=[]
f a|m<-z a=unlines[[" UD│L┘┐┤R└┌├─┴┬┼"!!(accumArray setBit 0(1&1,m&m)(e a)!(x,y))|x<-[1..m]]|y<-[1..m]]
main=interact$f.map read.words

Try it online!
Ungolfed
import Data.Bits
import Data.Array
import Data.List.Split

(&) = (,) -- Alias for tuples

-- Given [a,b], returns a list of all x: a <= x < b
halfOpenLeft x = [minimum x..maximum x-1::Int]

-- Same as above, but for all x: a < x <= b
halfOpenRight = map(+1).halfOpenLeft

up    = ((id, halfOpenRight), 0) -- Coordinates that should have a line upwards
down  = ((id, halfOpenLeft),  1) -- Coordinates that should have a line downwards
left  = ((halfOpenRight, id), 2) -- Coordinates that should have a line leftwards
right = ((halfOpenLeft, id),  3) -- Coordinates that should have a line rightwards

-- Create a map between coordinates and line-segments. Each coordinate can have multiple line-segments.
lineSegments :: [[Int]] -> [((Int,Int),Int)]
lineSegments rects = [ ((x,y),n) | [x1,x2,y1,y2] <- rects, ((f,g),n) <- [up,down,left,right], x <- f [x1,x2], y <- g [y1,y2]]

-- Convert an array of bit-fields into a list of lines.
printBitfieldArray :: Int -> Array (Int,Int) Int -> [String]
printBitfieldArray size a = [[" UD│L┘┐┤R└┌├─┴┬┼"!!(a!(x,y))|x<-[1..size]]|y<-[1..size]]

-- Merge all the line-segments for each coordinate into a bitfield
createBitFieldArray :: Int -> [((Int,Int),Int)] -> Array (Int,Int) Int
createBitFieldArray m = accumArray setBit 0 ((1,1),(m,m))

-- First split the input for each rectangle,
-- then create a list of pairs of coordinates and directions,
-- then merge all directions for each coordinate into a bitfield
-- and finally use the bitfield as an index to find out which shape to draw.
drawRectangles :: Int -> [Int] -> [String]
drawRectangles m=printBitFieldArray m.createBitFieldArray m.lineSegments.chunksOf 4

-- Parse the input, solve the problem and format the output. Use the largest number as both width and height.
main=interact$unlines.(drawRectangles=<<maximum).map read.words

Explanation

First, lineSegments (or d in the golfed version) will loop over all rectangles, all directions and all coordinates that should have a line-segment in that direction from that rectangle and create a list of coordinates paired with directions.
Then createBitFieldArry merges all entries with identical coordinates into an array of bitfields. Here, the 0th bit means up, 1st means down, 2nd means left and the 3rd means right. In other words, 5 is rendered as "┘", 0 is " " and 15 is "┼".
Lastly, printBitFieldArray (or p) converts the bitfields into box-drawing characters by using them as indices.

(1) You can use & in more places, x&y&n and (1&1,m&m). (2) You don't need the ::Int. (3) You don't need Data.List.Split, it's cheaper to pattern match like e(a:b:c:d:q)=...++e q;e[]=[]. (Renaming d due to shadowing.)

Try it online!

A bit more by inlining p into f and shuffling some things from main to f: Try it online!

@ØrjanJohansen Awsome, Thanks!

You're welcome! According to TIO, the lengths should be 388 340 338 (so I saved 48 bytes).

It's one byte better to only define l<-[1..z a] instead of m<-z a: Try it online!

3 more bytes with (.|.) instead of setBit (changing zip[0..] into &1 etc., which is the same length.) Try it online!

Node, 536 bytes
s=''
with(process.stdin){setEncoding('utf8')
on('readable',_=>s+=read()||'')
on('end',_=>{a=s.match(/(\d+\s+){3}\d+/g).map(s=>s.match(/\d+/g).map(m=>+m)).map(([m,n,o,p])=>[m>n?n:m,m>n?m:n,o>p?p:o,o>p?o:p])
m=i=>[...Array(Math.max(...a.map(a=>a[i])))]
console.log(m(3).map((_,y)=>m(1).map((_,x)=>' ??┘?│┐┤?└─┴┌├┬┼'[x++,a.some(([m,n,o,p])=>x==m|x==n&&y>o&y<=p)+2*a.some(([m,n,o,p])=>y==o|y==p&&x>m&x<=n)+4*a.some(([m,n,o,p])=>x==m|x==n&&y>=o&y<p)+8*a.some(([m,n,o,p])=>y==o|y==p&&x>=m&x<n)],y++).join``).join`\n`)})}

Directly calculates the correct character at each coordinate. Input is annoying to perform in Node...

Python 3, 632 bytes
i=input()
j=''
while i:j+=i+' ';i=input()
c=[int(k)-1for k in j.split()]
c=[c[k:k+4]for k in range(0,len(c),4)]
for q in c:
    for v,w in[(0,1),(2,3)]:
        if q[w]<q[v]:t=q[w];q[w]=q[v];q[v]=t
d=list(zip(*c))
w=max(d[1])+1
h=max(d[3])+1
g=[0]*w*h
def i(a,b,f):
    for k in b:
        for l in a:g[k*w+l]|=f[0];f=f[1:]
def p(k,l,m,n,o,j=0):
    for i in range(m,n,o):l[i]|=k
    if j:p(k,l,m+j,n+j,o)
for q in c:i(q[:2],q[2:],[6,12,3,9]);p(10,g,q[0]+1+q[2]*w,q[1]+q[2]*w,1,(q[3]-q[2])*w);p(5,g,q[0]+q[2]*w+w,q[0]+q[3]*w,w,q[1]-q[0])
print('\n'.join(map(lambda k: ''.join(map(lambda x: '   └ │┌├ ┘─┴┐┤┬┼'[x], k)),[g[x:x+w]for x in range(0,len(g),w)])))


text:
Draw a Straight Line
Draw a simple ASCII art image containing a straight line.
It's similar to this and this but with different specifications.
Input
You can modify this input format to suit your code.

integer width
integer height
integer x0
integer y0
integer x1
integer y1

Output
A filled ASCII art image of the specified width and height containing a line from pixel (x0, y0) to pixel (x1, y1).
Any standard form of text output is acceptable, but don't use built in line drawing functions.
Details
The line must be drawn using a single printable character (such as #), while the background is filled with a different character (such as .). You must print the necessary trailing characters so that the image size is correct.
Pixel coordinates can be 0-indexed or 1-indexed and can start in any corner of the image. The line should be drawn by imagining a 0-width sub-pixel line connecting the centers of the start and end pixels. Every pixel that the line enters should be filled in.
Winning
Usual code-golf rules. Shortest code wins.
Examples
IN: width, height, x0, y0, x1, y1

IN: 7, 6, 0, 0, 6, 5
OUT:
.....##
....##.
...##..
..##...
.##....
##.....

IN: 3, 3, 1, 1, 1, 1
OUT:
...
.#.
...

IN: 3, 3, 0, 2, 2, 0
OUT:
#..
.#.
..#

IN: 6, 3, 0, 0, 5, 2
OUT:
....##
.####.
##....

IN: 4, 4, -1, -1, 0, 3
OUT:
#...
#...
#...
....

I'd say "Welcome to PPCG" but you've been registered here almost as long as me. :-) Nice first challenge!

Can we output actual dots instead of spaces? or any other character but spaces? (assuming with still including the trailing s)

Sure! I'll make the edits

All lines are straight ;)

Can I take the input like this: [7 6] [0 0] [6 5] ? Perhaps change the order too?

@AlbertRenshaw Actually, when I look at Curve on Wikipedia it states: "In mathematics, a curve (also called a curved line in older texts) is, generally speaking, an object similar to a line but that need not be straight." ;)

@KevinCruijssen Implying that a line need be straight, no? ;)

Is non-ASCII encoding (and ASCII-compatible encoding) allowed? i.e. https://en.wikipedia.org/wiki/ZX80_character_set, https://en.wikipedia.org/wiki/ZX81_character_set and https://en.wikipedia.org/wiki/PETSCII - also do you mean true ASCII (7-bit) or extended ASCII (8-bit)?

@ShaunBebbers If it's vital to your program, other encodings are allowed. However, 7-bit or 8-bit ASCII is preferred

Mathematica, 166 137 bytes
l:={i,j};s=Sign;f[p_,q_,h_,w_]:=Grid@Table[(1-Max[s[p-l]s[q-l],0])Boole[Abs@Mean[s@Det@{p-l+#,p-q}&/@Tuples[.5{1,-1},2]]<.6],{i,h},{j,w}]

More readable version:
l := {i, j}; s = Sign;
f[p_, q_, h_, w_] :=
 Grid@Table[(1 - Max[s[p - l] s[q - l], 0]) Boole[
     Abs@Mean[
        s@Det@{p - l + #, p - q} & /@
         Tuples[.5 {1, -1}, 2]] < .6], {i, h}, {j, w}]

This defines a function called f. I interpreted the input and output specifications fairly liberally. The function f takes input in the format f[{x0, y0}, {x1, y1}, height, width], and the grid is 1-indexed, starting in the top left. Outputs look like

with the line displayed as 1s and the background as 0s (shown here for f[{2, 6}, {4, 2}, 5, 7]). The task of turning a Mathematica matrix of 1s and 0s into a string of #s and .s has been golfed in many other challenges before, so I could just use a standard method, but I don't think that adds anything interesting.
Explanation:
The general idea is that if the line passes through some pixel, then at least one of the four corners of the pixel is above the line, and at least one is below. We check if a corner is above or below the line by examining the angle between the vectors ({x0,y0} to corner) and ({x0,y0} to {x1,y1}): if this angle is positive, the corner is above, and if the angle is negative, the corner is below.
If we have two vectors {a1,b1} and {a2,b2}, we can check if the angle between them is positive or negative by finding the sign of the determinant of the matrix {{a1,b1},{a2,b2}}. (My old method of doing this used arithmetic of complex numbers, which was way too…well, complex.)
The way this works in the code is as follows:

{p-l+#,p-q}&/@Tuples[.5{1,-1},2] gets the four vectors from {x0,y0} and the four corners of the pixel (with l:={i,j}, the coordinates of the pixel, defined earlier), and also the vector between {x0,y0} and {x1,y1}.
s@Det@... finds the signs of the angles between the line and the four corners (using s=Sign). These will equal -1, 0 or 1.
Abs@Mean[...]<.6 checks that some of the angles are positive and some negative. The 4-tuples of signs that have this property all have means between -0.5 and 0.5 (inclusive), so we compare to 0.6 to save a byte by using < instead of <=.

There's still a problem: this code assumes that the line extends forever in both directions. We therefore need to crop the line by multiplying by 1-Max[s[p-l]s[q-l],0] (found by trial and error), which is 1 inside the rectangle defined by the endpoints of the line, and 0 outside it.

The rest of the code makes a grid of these pixels.
(As a bonus, here's an earlier attempt with a completely different method, for 181 bytes:)
Quiet@Grid@Table[(1-Max[Sign[{i,j}-#3]Sign[{i,j}-#4],0])Boole[#3==#4=={i,j}||2Abs@Tr[Cross@@Thread@{{i,j},#3,#4}]/Norm[d=#3-#4]<2^.5Cos@Abs[Pi/4-Mod[ArcTan@@d,Pi/2]]],{i,#},{j,#2}]&

Now that that's finished, time for lunch! (At 6:30 p.m…)

CJam, 122 bytes
{),V>{[I\]E.*A.+}/}:F;l~]2/~@:S~'.*f*\@:A.-_:g:E;:z:D[0=:B{D~I2*)*+:U(2/B/FU2/B/:V;}fID~\:I;F]{_Wf>\S.<+:*},{~_3$=@0tt}/N*

Try it online
This basically combines two answers I previously wrote for other challenges (mainly the calculations from the 2nd one - function l).
(0, 0) is naturally the top left corner, not bottom left like the examples in the statement.
Overview:
{),V>{[I\]E.*A.+}/}:F; defines function F which helps generate all the pixels (coordinate pairs) for a given x coordinate
l~]2/~@:S~'.*f*\@:A.-_:g:E;:z:D reads and processes the input, and creates a matrix of dots
0=:B{D~I2*)*+:U(2/B/FU2/B/:V;}fI iterates over all x coordinates except the last one, and generates all the corresponding pixels
D~\:I;F does the same for the last x coordinate
{_Wf>\S.<+:*}, keeps only the pixels that should appear inside the image
{~_3$=@0tt}/ puts a 0 in the matrix for each pixel
N* joins the matrix with newline characters for display