How does a switch OS know that this is the same syntax? There are certain commands where you might reference the vlan like so "switchport access vlan 35", (a space between vlan and the number) and other commands might be "int vlan35". Note, I'm not talking about naming anything with a string. Why should actual references to the vlan work as syntax with a space and without a space?
vlan 35 is used to refer to the (tagged or native) VLAN with VID 35.
vlan35 is a named interface (or anything else you can name), usually a switch virtual interface (SVI) - the name may default to vlanXX but could be anything you choose. Note that Cisco devices don't allow spaces in names.
Even though these may commonly be used interchangeably, they are completely different things. A VLAN is a switched layer-2 segment/network and an SVI is a logical interface within a VLAN that allows the switch to actively participate in a layer-2 network and consequentially in a layer-3 network.
Switch port access Vlan 35 refers to VLANs or Virtual LANs in your switch. Actually when you use this command it will create separate broadcast domain in your switch. It is a separate LAN inside single switch. This command is allowed port to use in vlan 35 in access mode
int vlan35 refer Virtual Interfaces. This command create Virtual interface in your Switch. Generally '
int=Interface'. Most of Network Device Operating System use
int for interface related commands.
Hope you understand.
Interface names in Cisco IOS cannot contain spaces. It breaks Cisco's interface naming convention, which is relied upon by automation scripts (among other things). This is why the "interface Vlanxx" is the only place where you see the usage minus the space.