G a d have the same restrictions as variable names ie

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cu < ada b < ed; ot < d(, ) < nl } Note that function names (e.g. a d have the same restrictions as variable names (i.e. they cannot d) start with a number or special symbol, etc.). Function calling & parameter passing Imagine we made a function for the o e l p c pprogram that checked if the strings overlapped vra.p and a function that determined the length of the overlap: #nld <otem icue isra> #nld <tig icue srn> uignmsaesd sn aepc t; itoelptr(tigs,srn s) n vraSatsrn 1 tig 2 { itsat n tr; frsat=0 sat<s.egh) sat+ o(tr ; tr 1lnt(; tr+) { i(1a(tr)= s.t0) fs.tsat = 2a() { rtr sat eun tr; } } rtr s.egh) eun 1lnt(; } itoelpeghsrn s,srn s,itsat n vraLnt(tig 1 tig 2 n tr) { iti j n ,; fri=sat j=0 ( <s.egh) & ( <s.egh);i+ j+ o( tr, ;i 1lnt() & j 2lnt() +, +) { i(1a()! s.tj) fs.ti = 2a() { bek ra; } } rtr j eun ; } itmi( n an) { srn ipt,ipt; tig nu1 nu2 itsatfvra,lntOOelp n trOOelp eghfvra; cu < "ne frtsrn:" ot < Etr is tig ; gtiecn ipt) eln(i, nu1; cu &...
View Full Document

This note was uploaded on 05/23/2013 for the course CSE 203 taught by Professor Eckroth during the Spring '10 term at Ohio State.

Ask a homework question - tutors are online